From f6afbe24c11afeab313659fc7e4e2be656fbd97a Mon Sep 17 00:00:00 2001 From: Gerald Yeo Date: Mon, 4 Sep 2017 13:14:00 +0800 Subject: [PATCH] 6.0.3 --- README.md | 2 +- circle.yml | 2 +- package.json | 4 ++-- scripts/build-publish.sh | 7 +++++++ scripts/build-site.sh | 10 +++++----- scripts/build.sh | 6 +++++- 6 files changed, 21 insertions(+), 10 deletions(-) create mode 100755 scripts/build-publish.sh diff --git a/README.md b/README.md index bedab20b..e2663f76 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Alternatively you can - Use unpkg.com ```html - + ``` For a live example, the [project site][project-web] has been built using `otplib-browser.js`. The source code can be found [here](https://github.com/yeojz/otplib/tree/master/site). diff --git a/circle.yml b/circle.yml index 47e6f45f..6ea24d31 100644 --- a/circle.yml +++ b/circle.yml @@ -30,7 +30,7 @@ deployment: - yarn run clean - yarn run build - echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login - - cd ./dist && npm publish + - cd dist && npm publish - npm logout - git config --global user.email $CI_DEPLOY_EMAIL - git config --global user.name $CI_DEPLOY_NAME diff --git a/package.json b/package.json index 4817573f..4b0b1375 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "otplib", - "version": "6.0.2", + "version": "6.0.3", "description": "HMAC-based (HOTP) and Time-based (TOTP) One-Time Password library", "main": "otplib.js", "scripts": { @@ -8,11 +8,11 @@ "build:browser": "webpack --config ./scripts/webpack.config.js", "build:docs": "jsdoc --configure jsdoc.json --verbose", "build:module": "./scripts/build-module.sh", - "build:copy": "cp ./{README.md,LICENSE,package.json,yarn.lock,.npmignore} ./dist", "build:transpile": "babel dist --out-dir dist", "clean": "rimraf dist coverage docs", "coveralls": "cat ./coverage/lcov.info | coveralls", "deploy-gh-pages": "./scripts/build-site.sh", + "deploy-package": "./scripts/build-publish.sh", "lint": "eslint --ext js src", "test": "jest --coverage", "test:watch": "jest --coverage --watch" diff --git a/scripts/build-publish.sh b/scripts/build-publish.sh new file mode 100755 index 00000000..76684ca6 --- /dev/null +++ b/scripts/build-publish.sh @@ -0,0 +1,7 @@ +yarn run clean +yarn run build +echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login +cd dist +pwd +npm publish +npm logout diff --git a/scripts/build-site.sh b/scripts/build-site.sh index 274718bd..0e4c4cbf 100755 --- a/scripts/build-site.sh +++ b/scripts/build-site.sh @@ -1,12 +1,12 @@ # Generate file dependants -yarn run build:browser; -yarn run build:docs; +yarn run build:browser +yarn run build:docs # Build within site directory -cd site; -yarn install; +cd site +yarn install yarn run clean -yarn run build; +yarn run build yarn run deploy cd .. diff --git a/scripts/build.sh b/scripts/build.sh index a7a95b0e..2dd4411b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,8 @@ yarn run build:module yarn run build:transpile -yarn run build:copy NODE_ENV=production yarn run build:browser +cp README.md dist/README.md +cp LICENSE dist/LICENSE +cp package.json dist/package.json +cp yarn.lock dist/yarn.lock +cp .npmignore dist/.npmignore