@transitive-sdk/utils-caps 0.2.11 → 0.3.0
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/esbuild.js +6 -0
- package/package.json +1 -1
- package/subScript +2 -2
package/esbuild.js
CHANGED
|
@@ -22,6 +22,11 @@ const entryPoints = fs.readdirSync('./web', {withFileTypes: true})
|
|
|
22
22
|
|
|
23
23
|
const isDevelopment = (process.env.npm_lifecycle_event != 'prepare');
|
|
24
24
|
|
|
25
|
+
// Capability authors can set `config.esbuild.external` to a comma-separated list
|
|
26
|
+
// of npm packages to exclude from the bundle, to keep the size small. See
|
|
27
|
+
// https://esbuild.github.io/api/#external for details.
|
|
28
|
+
const external = (process.env.npm_package_config_esbuild_external || '').split(',');
|
|
29
|
+
|
|
25
30
|
const config = {
|
|
26
31
|
entryPoints,
|
|
27
32
|
metafile: true, // for bundle analyser
|
|
@@ -34,6 +39,7 @@ const config = {
|
|
|
34
39
|
format: 'iife', // will be overwritten, see `formats` below
|
|
35
40
|
// splitting: true,
|
|
36
41
|
// external: ['react', 'react-dom'],
|
|
42
|
+
external,
|
|
37
43
|
define: {
|
|
38
44
|
TR_PKG_VERSION: JSON.stringify(process.env.npm_package_version),
|
|
39
45
|
TR_PKG_NAME: JSON.stringify(process.env.npm_package_name),
|
package/package.json
CHANGED
package/subScript
CHANGED
|
@@ -39,7 +39,7 @@ if [[ $SUBSCRIPT == "start" ]]; then
|
|
|
39
39
|
if [[ $SUBPROJECT ]]; then
|
|
40
40
|
rm -rf $SUBPROJECT/node_modules/.*-* $SUBPROJECT/node_modules/@*/.*-*
|
|
41
41
|
fi;
|
|
42
|
-
npm $PREFIX ls || npm $PREFIX update
|
|
42
|
+
npm $PREFIX ls || FORCE_COLOR=0 npm $PREFIX update
|
|
43
43
|
fi;
|
|
44
44
|
|
|
45
45
|
if [[ $SUBPROJECT ]]; then
|
|
@@ -51,7 +51,7 @@ if [[ $SUBPROJECT ]]; then
|
|
|
51
51
|
rm -rf $SUBPROJECT/node_modules
|
|
52
52
|
fi;
|
|
53
53
|
|
|
54
|
-
npm $PREFIX $npm_lifecycle_event
|
|
54
|
+
FORCE_COLOR=0 npm $PREFIX $npm_lifecycle_event
|
|
55
55
|
else
|
|
56
56
|
echo "Invoking $SUBSCRIPT in $SUBPROJECT"
|
|
57
57
|
npm $PREFIX run --if-present $SUBSCRIPT
|