rewrite most test commands to be platform agnostic

This commit is contained in:
blagoev 2017-03-20 22:44:06 +02:00
parent f0d70d4061
commit edf4cb5760
2 changed files with 28 additions and 3 deletions

View File

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

View 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);
}
});