From a878cdccf399ce4fd89a00827af0bf39957b621a Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sun, 30 Sep 2018 18:54:49 -0700 Subject: [PATCH] style: add convenience script to run all examples --- web3.js/.travis.yml | 2 +- web3.js/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web3.js/.travis.yml b/web3.js/.travis.yml index 3876851e2a..2146072073 100644 --- a/web3.js/.travis.yml +++ b/web3.js/.travis.yml @@ -14,7 +14,7 @@ script: - npm run doc - npm run flow - npm run lint - - for example in examples/*.js; do node $example; done + - npm run examples - npm run codecov before_deploy: diff --git a/web3.js/package.json b/web3.js/package.json index c7d422dc0a..0b7ed63740 100644 --- a/web3.js/package.json +++ b/web3.js/package.json @@ -39,6 +39,7 @@ "lint:watch": "watch 'npm run lint:fix' . --wait=1 --ignoreDirectoryPattern=/doc/", "ok": "npm run lint && npm run flow && npm run test && npm run doc", "prepare": "npm run clean && npm run ok && npm run build", + "examples": "set -ex; for example in examples/*.js; do node $example; done", "re": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git" }, "dependencies": {