From 7fc460624a6d0dfd76369d89bc052d84c8d52376 Mon Sep 17 00:00:00 2001 From: Cameron Tacklind Date: Mon, 2 Mar 2020 10:52:07 -0800 Subject: [PATCH] Use prepare script (#1751) Using `prepare` step to build ensures that dependency can be installed directly from git repository https://docs.npmjs.com/misc/scripts#prepublish-and-prepare `prepublishOnly` is run **after** `prepare` script so this should have no effect. Co-authored-by: Jos de Jong --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 80eefa4bb0..6343243171 100644 --- a/package.json +++ b/package.json @@ -208,7 +208,8 @@ "test:browser": "karma start test/browser-test-config/local-karma.js", "test:browserstack": "karma start test/browser-test-config/browserstack-karma.js", "coverage": "nyc --reporter=lcov --reporter=text-summary mocha test/unit-tests --recursive --require @babel/register && echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"", - "prepublishOnly": "npm run build-and-test" + "prepublishOnly": "npm run test:src && npm run test:generated && npm run test:node && npm run lint", + "prepare": "npm run build" }, "bin": { "mathjs": "./bin/cli.js"