mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 22:36:01 +00:00
rewrite most test commands to be platform agnostic
This commit is contained in:
parent
f0d70d4061
commit
edf4cb5760
12
package.json
12
package.json
@ -44,15 +44,20 @@
|
||||
"dependencies.list"
|
||||
],
|
||||
"scripts": {
|
||||
"get-version": "echo $npm_package_version",
|
||||
"get-version": "node -p process.env.npm_package_version",
|
||||
"set-version": "scripts/set-version.sh",
|
||||
"get-core-version": "scripts/download-core.sh --version",
|
||||
"get-sync-version": "scripts/download-core.sh --versionSync",
|
||||
"jsdoc": "rm -rf docs/output && jsdoc -u docs/tutorials -p package.json -c docs/conf.json",
|
||||
"lint": "eslint",
|
||||
"test": "scripts/test.sh",
|
||||
"install": "node-pre-gyp install --fallback-to-build",
|
||||
"prepublish": "node scripts/prepublish.js"
|
||||
"prepublish": "node scripts/prepublish.js",
|
||||
"eslint": "npm install && npm run lint .",
|
||||
"license-check": "license-checker --exclude MIT,ISC,BSD,Apache-2.0,BSD-2-Clause,BSD-3-Clause,WTFPL,Unlicense,(MIT AND CC-BY-3.0) | node scripts/handle-license-check.js",
|
||||
"jsdoc:clean": "rimraf ./docs/output",
|
||||
"jsdoc": "npm install && npm run jsdoc:clean && jsdoc -c docs/conf.json",
|
||||
"node-tests": "npm install --build-from-source && cd tests && npm install && npm run test-nosync && cd ..",
|
||||
"node-nosync-tests": "npm install --build-from-source && cd tests && npm install && npm run test-nosync && cd .."
|
||||
},
|
||||
"dependencies": {
|
||||
"extract-zip": "^1.6.0",
|
||||
@ -72,6 +77,7 @@
|
||||
"jsdoc": "^3.4.0",
|
||||
"license-checker": "^8.0.3",
|
||||
"mockery": "^2.0.0",
|
||||
"rimraf": "^2.6.1",
|
||||
"semver": "^5.1.0"
|
||||
},
|
||||
"rnpm": {
|
||||
|
19
scripts/handle-license-check.js
Normal file
19
scripts/handle-license-check.js
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
process.stdin.resume();
|
||||
process.stdin.setEncoding('utf8');
|
||||
|
||||
var licenseCheckerResult;
|
||||
|
||||
process.stdin.on('data', function(data) {
|
||||
licenseCheckerResult += data;
|
||||
});
|
||||
|
||||
process.stdin.on('end', function() {
|
||||
if (!licenseCheckerResult) {
|
||||
console.log("All licenses are accepted");
|
||||
} else {
|
||||
console.error("Unknown license detected in dependency:");
|
||||
console.error(licenseCheckerResult);
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user