Skip to content

Commit c5f1d56

Browse files
committed
build(webpack): add deployment script
1 parent 15d2e19 commit c5f1d56

File tree

3 files changed

+63
-22
lines changed

3 files changed

+63
-22
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
2-
.data/
2+
.data/
3+
/dist

package-lock.json

Lines changed: 59 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "webpack --config webpack.config.prod.js",
1313
"prestart": "npm run clean-dist && npm run copy-files",
1414
"start": "webpack --config webpack.config.dev.js && webpack-dev-server --config webpack.config.dev.js",
15-
"publish": "git push origin `git subtree split --prefix dist develop`:gh-pages --force",
15+
"publish": "push-dir --dir=dist --branch=gh-pages --cleanup",
1616
"deploy": "npm run build && npm run publish && npm run clean-dist"
1717
},
1818
"dependencies": {
@@ -43,6 +43,7 @@
4343
"fetch-mock": "^7.3.0",
4444
"html-webpack-plugin": "^3.2.0",
4545
"jest": "^24.1.0",
46+
"push-dir": "^0.4.1",
4647
"rimraf": "^2.6.3",
4748
"webpack": "^4.29.6",
4849
"webpack-cli": "^3.2.3",

0 commit comments

Comments
 (0)