Skip to content

Commit ed3df99

Browse files
committed
fix: ensure bundle.js for release
1 parent 2d4cf0f commit ed3df99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@
2929
"_graphviz": "madge src --dot > structure.gv",
3030
"mortero": "mortero -Ddist -spublic -X{_base,lib} -ecss.less",
3131
"watch": "npm run mortero -- -w",
32-
"build": "npm run mortero -- -f _NODE_ENV=production",
32+
"build": "npm run mortero --",
3333
"pretest": "npm run lint && npm run build -- -ymain",
3434
"copy:vendor": "concat -o dist/vendor.js node_modules/json-schema-ref-parser/dist/ref-parser.min.js node_modules/jsonpath-plus/dist/index-browser-umd.min.js",
35+
"copy:bundle": "concat -o dist/bundle.js dist/vendor.js dist/main.iife.js",
3536
"copy:wargs": "concat -o dist/wargs.min.js node_modules/wargs/dist/wargs.min.js",
36-
"postbuild": "echo 'module.exports = require(\"./main.cjs.js\").default;' > dist/index.js",
37+
"entry:cjs": "echo 'module.exports = require(\"./main.cjs.js\").default;' > dist/index.js",
38+
"prepublishOnly": "npm run build -- -f",
39+
"postbuild": "npm run copy:bundle && npm run entry:cjs",
3740
"prebuild": "mkdir -p dist && npm run copy:vendor && npm run copy:wargs",
3841
"codecov": "codecov --file=coverage/lcov.info -e TRAVIS_NODE_VERSION"
3942
},

0 commit comments

Comments
 (0)