From 4a99b1c956bca5d54d0fea321b0e064995bffd24 Mon Sep 17 00:00:00 2001 From: xiazeyu_2011 Date: Thu, 15 Feb 2018 23:46:59 +0800 Subject: [PATCH] build: greater build flow --- .github/CONTRIBUTING.md | 19 ++++++++----------- package-lock.json | 2 +- package.json | 1 + 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4baef8c..0237d37 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -69,7 +69,7 @@ work is not in vain. - **Use `npm run build:prod` to build final client js.** **Important!!! The step must be done before commit!!!** -- Use `git add *`, or choose the file you want to commit. +- Use `git add .`, or choose the file you want to commit. - Use `npm run commit` to commit, **Never use `git commit`!!!** @@ -77,15 +77,12 @@ work is not in vain. - Use `git push` to push the changes to the github server. -### 6. Push to the webbranch - -- Use `push-gh-pages.bat` or `push-gh-pages.sh` - ## Workflow(author): Release a new version *Let the Collaborator or author do it.* + ### 1. Bump the version - bump the version in `package.json` @@ -94,17 +91,17 @@ work is not in vain. - run `npm install` to generate new `package-lock.json` -### 2. Commit package.json and package-lock.json +### 2. Build the library -- Use `npm run commit` to commit, **Never use `git commit`!!!** +- `npm run deploy` -### 3. Tag and release a new version +### 3. Commit package.json and package-lock.json -- In the Github page. +- Use `npm run commit` to commit, **Never use `git commit`!!!** -### 4. Update changelog +### 4. Tag and release a new version -- Use `npm run changelog` +- In the Github page. ### 5. Publish the package to npm. diff --git a/package-lock.json b/package-lock.json index 8242895..082f37f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "live2d-widget", - "version": "3.0.4", + "version": "3.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d2eed86..9fb786d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "build:docs": "git pull && npm run _changelog && git add CHANGELOG.md && npm run update:submodule && git add ghpages", "build:esdoc": "cp lib/stats.html ghpages/stats.html -f && npm run _esdoc", "deploy:doc": "cd ghpages/ && git status && git add . && git commit -m \"Update docs\" && git push --force && cd ..", + "deploy": "build:prod && build:docs", "lint": "eslint --ext .js ./src", "commit": "git pull && git-cz", "v:major": "npm version major",