fix for #90 #1
5
.npmignore
Normal file
5
.npmignore
Normal file
@@ -0,0 +1,5 @@
|
||||
# npmignore overrides .gitignore for yarn pack
|
||||
# Only exclude source files, not built files
|
||||
entry-asar/**/*.mts
|
||||
entry-asar/**/*.ts
|
||||
entry-asar/**/tsconfig.json
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.esm.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"target":"ESNext",
|
||||
"outDir": ".",
|
||||
"moduleResolution": "bundler"
|
||||
},
|
||||
"include": [
|
||||
".",
|
||||
|
||||
@@ -19,8 +19,11 @@
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"entry-asar/*",
|
||||
"!entry-asar/**/*.{ts,mts}",
|
||||
"entry-asar/**/*",
|
||||
"!entry-asar/**/has-asar.ts",
|
||||
"!entry-asar/**/no-asar.ts",
|
||||
"!entry-asar/**/has-asar.mts",
|
||||
"!entry-asar/**/no-asar.mts",
|
||||
"!entry-asar/**/tsconfig.json",
|
||||
"README.md"
|
||||
],
|
||||
@@ -29,7 +32,7 @@
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p entry-asar/esm/tsconfig.json && tsc -p entry-asar/cjs/tsconfig.json",
|
||||
"build": "tsc -p tsconfig.json && tsc -p entry-asar/esm/tsconfig.json && tsc -p entry-asar/cjs/tsconfig.json",
|
||||
"build:docs": "npx typedoc",
|
||||
"lint": "prettier --check \"{src,entry-asar,test}/**/*.ts\" \"*.ts\"",
|
||||
"prettier:write": "prettier --write \"{src,entry-asar,test}/**/*.ts\" \"*.ts\"",
|
||||
|
||||
@@ -266,13 +266,13 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise<void> =
|
||||
// This needs to be a different file depending on if the app entrypoint is CommonJS or ESM.
|
||||
if (pj.type === 'module' || pj.main.endsWith('.mjs')) {
|
||||
await fs.promises.cp(
|
||||
path.resolve(import.meta.dirname, '..', '..', 'entry-asar', 'esm', 'no-asar.mjs'),
|
||||
path.resolve(import.meta.dirname, '..', 'entry-asar', 'esm', 'no-asar.mjs'),
|
||||
path.resolve(entryAsar, 'index.mjs'),
|
||||
);
|
||||
pj.main = 'index.mjs';
|
||||
} else {
|
||||
await fs.promises.cp(
|
||||
path.resolve(import.meta.dirname, '..', '..', 'entry-asar', 'cjs', 'no-asar.js'),
|
||||
path.resolve(import.meta.dirname, '..', 'entry-asar', 'cjs', 'no-asar.js'),
|
||||
path.resolve(entryAsar, 'index.js'),
|
||||
);
|
||||
pj.main = 'index.js';
|
||||
@@ -363,13 +363,13 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise<void> =
|
||||
// This needs to be a different file depending on if the app entrypoint is CommonJS or ESM.
|
||||
if (pj.type === 'module' || pj.main.endsWith('.mjs')) {
|
||||
await fs.promises.cp(
|
||||
path.resolve(import.meta.dirname, '..', '..', 'entry-asar', 'esm', 'has-asar.mjs'),
|
||||
path.resolve(import.meta.dirname, '..', 'entry-asar', 'esm', 'has-asar.mjs'),
|
||||
path.resolve(entryAsar, 'index.mjs'),
|
||||
);
|
||||
pj.main = 'index.mjs';
|
||||
} else {
|
||||
await fs.promises.cp(
|
||||
path.resolve(import.meta.dirname, '..', '..', 'entry-asar', 'cjs', 'has-asar.js'),
|
||||
path.resolve(import.meta.dirname, '..', 'entry-asar', 'cjs', 'has-asar.js'),
|
||||
path.resolve(entryAsar, 'index.js'),
|
||||
);
|
||||
pj.main = 'index.js';
|
||||
|
||||
Reference in New Issue
Block a user