From 2492d30ec0e71fee1f3c822846c9e6653ce18329 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Thu, 21 Jun 2018 10:03:08 -0700 Subject: [PATCH 1/2] Add build-fresh script and publish script --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 77380fef..7245f7f3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "Develop Apps Script Projects locally", "main": "index.js", "scripts": { - "build": "npm i; tsc --project tsconfig.json; npm i -g --loglevel=error;", + "build": "tsc --project tsconfig.json; npm i -g --loglevel=error;", + "build-fresh": "npm cache clean --force; npm i; npm run build;", + "publish": "npm publish --access public && git push --follow-tags", "docs": "tsc docs.ts && node docs.js", "lint": "tslint --project tslint.json && echo 'No lint errors. All good!'", "test": "nyc --cache false mocha --timeout 100000 -- tests/*.js", From 633a4bfda4d5dfa1bd9570b6c99c2dcac8bb7fca Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Thu, 21 Jun 2018 10:07:19 -0700 Subject: [PATCH 2/2] Update README with npm run build-fresh and npm run publish --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0864eda4..08baa049 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,8 @@ sudo npm run build; clasp ``` +(If you see build errors, run `sudo npm run build-fresh`) + #### Run Tests (experimental) Change `describe.skip(...)` to `describe(...)` for relevant tests. @@ -369,7 +371,7 @@ Run `npm run docs` to build the "How To" section. Copy/paste that section into t 1. Build `index.js` locally. `.gitignore`/`.npmignore` will hide js/ts files appropriately. 1. Bump version: `npm version [major|minor|patch] -m "Bump version to %s"` -1. Publish with: `npm publish --access public && git push --follow-tags` +1. Publish with: `npm run publish` ### Contributing