makepack 1.6.3 → 1.6.5
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
|
@@ -11,7 +11,9 @@ const eBuild = async (ebconfig) => {
|
|
|
11
11
|
await esbuild.build({
|
|
12
12
|
jsx: 'automatic',
|
|
13
13
|
...ebconfig,
|
|
14
|
-
outExtension: { '.js': ebconfig.format ===
|
|
14
|
+
outExtension: { '.js': ebconfig.format === 'esm' ? '.mjs' : '.cjs' },
|
|
15
|
+
outbase: path.join(process.cwd(), 'src'),
|
|
16
|
+
entryNames: '[dir]/[name]',
|
|
15
17
|
loader: {
|
|
16
18
|
'.ts': 'ts',
|
|
17
19
|
'.tsx': 'tsx'
|
|
@@ -7,8 +7,8 @@ export default async (info) => {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
if (info.template.includes("react")) {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
devDependencies["react"] = "^19.0.0"
|
|
11
|
+
devDependencies["react-dom"] = "^19.0.0"
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
if (info.template.includes("typescript")) {
|
|
@@ -43,7 +43,7 @@ export default async (info) => {
|
|
|
43
43
|
scripts: {
|
|
44
44
|
"start": "makepack start",
|
|
45
45
|
"build": "makepack build",
|
|
46
|
-
"
|
|
46
|
+
"release": "makepack release"
|
|
47
47
|
},
|
|
48
48
|
dependencies,
|
|
49
49
|
devDependencies
|
|
@@ -2,7 +2,7 @@ import path from 'path'
|
|
|
2
2
|
import { execSync, logger } from '../../helpers.js'
|
|
3
3
|
import fs from 'fs-extra'
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const release = async () => {
|
|
6
6
|
const buildDir = path.join(process.cwd(), '.mpack')
|
|
7
7
|
const packageJsonPath = path.join(buildDir, 'package.json')
|
|
8
8
|
const exists = fs.existsSync(buildDir)
|
|
@@ -11,10 +11,10 @@ const publish = async () => {
|
|
|
11
11
|
process.exit(1)
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
logger.info(`
|
|
14
|
+
logger.info(`Releaseing the production build to the npm repository...`)
|
|
15
15
|
execSync(`npm publish`, {
|
|
16
16
|
cwd: buildDir
|
|
17
17
|
})
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export default
|
|
20
|
+
export default release
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Command } from "commander";
|
|
|
4
4
|
import start from "./actions/start/index.js";
|
|
5
5
|
import build from "./actions/build/index.js";
|
|
6
6
|
import create from "./actions/create/index.js";
|
|
7
|
-
import
|
|
7
|
+
import release from "./actions/release/index.js";
|
|
8
8
|
|
|
9
9
|
const program = new Command();
|
|
10
10
|
|
|
@@ -34,8 +34,8 @@ program
|
|
|
34
34
|
.action(build);
|
|
35
35
|
|
|
36
36
|
program
|
|
37
|
-
.command("
|
|
38
|
-
.description("
|
|
39
|
-
.action(
|
|
37
|
+
.command("release")
|
|
38
|
+
.description("Release it to the npm repository")
|
|
39
|
+
.action(release);
|
|
40
40
|
|
|
41
41
|
program.parse();
|