Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] only execute tests after a successful build
Browse files Browse the repository at this point in the history
  • Loading branch information
thealjey committed Sep 29, 2015
1 parent a25ba24 commit 0715999
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ var rootDir = join(__dirname, '..'),
readme = join(rootDir, 'README.md'),
jsdocConfig = join(rootDir, 'config', 'jsdoc.json'),
js = new JS(),
jsdoc = new NativeProcess(join(rootDir, 'node_modules', '.bin', 'jsdoc'));
jsdoc = new NativeProcess(join(rootDir, 'node_modules', '.bin', 'jsdoc')),
npm = new NativeProcess('npm');

js.beDir(libDir, buildDir, function () {
jsdoc.run(function (e) {
if (e) {
return console.error(e);
jsdoc.run(function (jsdocErr) {
if (jsdocErr) {
return console.error(jsdocErr);
}
console.log('\x1b[32mGenerated API documentation!\x1b[0m');
npm.run(Function.prototype, ['test'], {stdio: 'inherit'});
}, [buildDir, '-d', docsDir, '-R', readme, '-c', jsdocConfig]);
}, specDir, __filename);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "build/index.js",
"scripts": {
"test": "babel-istanbul cover --root lib --print detail --include-all-sources --include-babel-polyfill jasmine",
"build": "npm test && babel-node bin/build"
"build": "babel-node bin/build"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 0715999

Please sign in to comment.