@imtf/profile-scripts 1.5.0 → 1.5.2
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/bin/profile-scripts.js +1 -1
- package/package.json +5 -5
- package/scripts/esbuild.mjs +10 -6
package/bin/profile-scripts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtf/profile-scripts",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Default scripts to bundle & transpile imtf front-end plugins",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"profile-scripts": "
|
|
7
|
+
"profile-scripts": "bin/profile-scripts.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"changelog.md"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "NODE_ENV=production node scripts/esbuild.mjs --entryPoint=index.tsx",
|
|
16
|
-
"start": "node scripts/esbuild.mjs --entryPoint=index.tsx --watch"
|
|
15
|
+
"build": "NODE_ENV=production node scripts/esbuild.mjs --entryPoint=src/index.tsx",
|
|
16
|
+
"start": "node scripts/esbuild.mjs --entryPoint=src/index.tsx --watch"
|
|
17
17
|
},
|
|
18
18
|
"prettier": "@imtf/prettier-config",
|
|
19
19
|
"license": "UNLICENSED",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@svgr/core": "^8.1.0",
|
|
23
23
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
24
24
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
25
|
-
"esbuild": "^0.
|
|
25
|
+
"esbuild": "^0.27.0",
|
|
26
26
|
"esbuild-css-modules-plugin": "^3.1.4",
|
|
27
27
|
"esbuild-plugin-external-global": "^1.0.1",
|
|
28
28
|
"esbuild-plugin-inline-css": "^0.0.1",
|
package/scripts/esbuild.mjs
CHANGED
|
@@ -12,7 +12,12 @@ const externalGlobalPlugin = esbuild.externalGlobalPlugin;
|
|
|
12
12
|
import notifierPlugin from "./notifierPlugin.mjs";
|
|
13
13
|
import svgPlugin from "./svgPlugin.mjs";
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
watch,
|
|
17
|
+
entryPoint,
|
|
18
|
+
externalGlobal,
|
|
19
|
+
outbase = "src",
|
|
20
|
+
} = minimist(process.argv.slice(2));
|
|
16
21
|
|
|
17
22
|
const externalGlobals = externalGlobal
|
|
18
23
|
? (typeof externalGlobal === "string"
|
|
@@ -36,17 +41,16 @@ const entryPoints = entryPoint
|
|
|
36
41
|
*/
|
|
37
42
|
const config = {
|
|
38
43
|
entryPoints,
|
|
44
|
+
outbase,
|
|
39
45
|
outdir: "build",
|
|
40
46
|
platform: "browser",
|
|
41
47
|
bundle: true,
|
|
42
|
-
target: "
|
|
48
|
+
target: "es2024",
|
|
43
49
|
metafile: true,
|
|
44
50
|
|
|
45
51
|
sourcemap: watch ? "linked" : "external",
|
|
46
52
|
|
|
47
|
-
minify:
|
|
48
|
-
process.env.NODE_ENV === "production" &&
|
|
49
|
-
process.env.IMTF_MINIFY_WEBAPP !== "false",
|
|
53
|
+
minify: watch === true ? false : process.env.IMTF_MINIFY_WEBAPP !== "false",
|
|
50
54
|
|
|
51
55
|
loader: {
|
|
52
56
|
// Enable JSX in .js files too
|
|
@@ -88,5 +92,5 @@ if (watch) {
|
|
|
88
92
|
.createServer((...params) => handler(...params, { public: "build" }))
|
|
89
93
|
.listen(3010, () => console.log("Running at http://localhost:3010"));
|
|
90
94
|
} else {
|
|
91
|
-
build(config);
|
|
95
|
+
await build(config);
|
|
92
96
|
}
|