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 <wjosdejong@gmail.com>
This commit is contained in:
Cameron Tacklind 2020-03-02 10:52:07 -08:00 committed by GitHub
parent 033a6baac7
commit 7fc460624a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"