From 0a41fc3959071927bd43da297a536b903949a058 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Mon, 18 Jan 2021 11:38:33 +0100 Subject: [PATCH 1/2] chore: add prepublish script --- CONTRIBUTING.md | 4 +--- package.json | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c65e6496..7c36786f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,6 +39,4 @@ After submitting the pull request, please make sure the Continuous Integration c ## Releasing 1. Merge the release PR -2. Switch to the default branch `git checkout master` -3. Pull latest changes `git pull` -4. Publish the package `npm publish` +2. Publish the package `npm publish` diff --git a/package.json b/package.json index b4398899..6c9f54c1 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,12 @@ "test:dev": "run-s test:dev:*", "test:ci": "run-s test:ci:*", "test:dev:ava": "ava", - "test:ci:ava": "nyc -r lcovonly -r text -r json ava" + "test:ci:ava": "nyc -r lcovonly -r text -r json ava", + "prepublishOnly": "npx npm-run-all -s prepublishOnly:*", + "prepublishOnly:checkout": "git checkout master", + "prepublishOnly:pull": "git pull", + "prepublishOnly:install": "npm ci", + "prepublishOnly:test": "npm test" }, "scriptsArgs": { "eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{bin,.github}/**/*.{js,md,html}\" \".*.js\"", From 684e58525ee7c33f50ad319914af1cb179d0e5d9 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Mon, 18 Jan 2021 15:18:44 +0100 Subject: [PATCH 2/2] refactor: use run-s instead of npx npm-run-all --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c9f54c1..a991d41c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "test:ci": "run-s test:ci:*", "test:dev:ava": "ava", "test:ci:ava": "nyc -r lcovonly -r text -r json ava", - "prepublishOnly": "npx npm-run-all -s prepublishOnly:*", + "prepublishOnly": "run-s prepublishOnly:*", "prepublishOnly:checkout": "git checkout master", "prepublishOnly:pull": "git pull", "prepublishOnly:install": "npm ci",