Build development and production code in one go and include it into the repository

This commit is contained in:
Marc Faber
2020-06-01 14:44:53 +02:00
parent 2c271acfe9
commit 73056f5620

View File

@@ -13,11 +13,13 @@
"git graph" "git graph"
], ],
"scripts": { "scripts": {
"build": "webpack --progress --colors -p", "build:development": "webpack --progress --colors",
"build:production": "yarn build:development -p --config webpack.config.prod.babel.js",
"build": "yarn build:development && yarn build:production",
"postbuild": "documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md", "postbuild": "documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md",
"build:watch": "yarn build --watch", "build:watch": "yarn build --watch",
"minify": "minify ./dist/mermaid.js > ./dist/mermaid.min.js", "minify": "minify ./dist/mermaid.js > ./dist/mermaid.min.js",
"release": "yarn build -p --config webpack.config.prod.babel.js", "release": "yarn build",
"lint": "eslint src", "lint": "eslint src",
"e2e:depr": "yarn lint && jest e2e --config e2e/jest.config.js", "e2e:depr": "yarn lint && jest e2e --config e2e/jest.config.js",
"cypress": "percy exec -- cypress run", "cypress": "percy exec -- cypress run",
@@ -26,7 +28,7 @@
"dev": "webpack-dev-server --config webpack.config.e2e.js", "dev": "webpack-dev-server --config webpack.config.e2e.js",
"test": "yarn lint && jest src/.*", "test": "yarn lint && jest src/.*",
"test:watch": "jest --watch src", "test:watch": "jest --watch src",
"prepublishOnly": "yarn build && yarn release && yarn test && yarn e2e", "prepublishOnly": "yarn build && yarn test && yarn e2e",
"prepush": "yarn test", "prepush": "yarn test",
"prepare": "yarn build" "prepare": "yarn build"
}, },