makepack 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,19 +6,17 @@ import ora from 'ora'
|
|
|
6
6
|
import { glob } from 'glob'
|
|
7
7
|
import ts from 'typescript'
|
|
8
8
|
|
|
9
|
-
const eBuild = async (
|
|
9
|
+
const eBuild = async (conf) => {
|
|
10
10
|
|
|
11
11
|
await esbuild.build({
|
|
12
12
|
jsx: 'automatic',
|
|
13
|
-
...
|
|
14
|
-
outExtension: { '.js': ebconfig.format === 'esm' ? '.mjs' : '.cjs' },
|
|
15
|
-
outbase: path.join(process.cwd(), 'src'),
|
|
16
|
-
entryNames: '[dir]/[name]',
|
|
13
|
+
...conf,
|
|
14
|
+
// outExtension: { '.js': ebconfig.format === 'esm' ? '.mjs' : '.cjs' },
|
|
17
15
|
loader: {
|
|
18
16
|
'.ts': 'ts',
|
|
19
17
|
'.tsx': 'tsx'
|
|
20
18
|
},
|
|
21
|
-
outdir: path.join(process.cwd(), '.mpack'),
|
|
19
|
+
outdir: path.join(process.cwd(), '.mpack', conf.format === 'esm' ? '' : conf.format),
|
|
22
20
|
})
|
|
23
21
|
}
|
|
24
22
|
|
|
@@ -163,7 +161,7 @@ const build = async (args) => {
|
|
|
163
161
|
spinner.succeed("package.json and readme.md files copied successfully!")
|
|
164
162
|
console.log(chalk.green(`\nBuild completed successfully!`));
|
|
165
163
|
console.log(`\nTo publish your package to npm:`);
|
|
166
|
-
console.log(`${chalk.green(`npm run
|
|
164
|
+
console.log(`${chalk.green(`npm run release`)} or navigate to the ${chalk.green(`.mpack`)} directory and run ${chalk.green(`npm publish`)}`);
|
|
167
165
|
}
|
|
168
166
|
|
|
169
167
|
export default build
|
|
@@ -27,24 +27,34 @@ export default async (info) => {
|
|
|
27
27
|
description: "",
|
|
28
28
|
keywords: [],
|
|
29
29
|
sideEffects: false,
|
|
30
|
-
// "exports": {
|
|
31
|
-
// ".": {
|
|
32
|
-
// "types": "./types/index.d.ts",
|
|
33
|
-
// "require": "./cjs/index.js",
|
|
34
|
-
// "import": "./index.js",
|
|
35
|
-
// },
|
|
36
|
-
// "./types/*": "./types/*.d.ts",
|
|
37
|
-
// "./cjs/*": "./cjs/*.js",
|
|
38
|
-
// "./*": {
|
|
39
|
-
// "import": "./*.js",
|
|
40
|
-
// "require": "./cjs/*.js"
|
|
41
|
-
// }
|
|
42
|
-
// },
|
|
43
30
|
scripts: {
|
|
44
31
|
"start": "makepack start",
|
|
45
32
|
"build": "makepack build",
|
|
46
33
|
"release": "makepack release"
|
|
47
34
|
},
|
|
35
|
+
exports: {
|
|
36
|
+
".": {
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./index.d.ts",
|
|
39
|
+
"default": "./cjs/index.js"
|
|
40
|
+
},
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"default": "./index.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"./*": {
|
|
47
|
+
"require": {
|
|
48
|
+
"types": "./*.d.ts",
|
|
49
|
+
"default": "./cjs/*.js"
|
|
50
|
+
},
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./*.d.ts",
|
|
53
|
+
"default": "./*.js"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"./cjs": null,
|
|
57
|
+
},
|
|
48
58
|
dependencies,
|
|
49
59
|
devDependencies
|
|
50
60
|
}
|