-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d53c6bf
commit edd09cb
Showing
8 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env node | ||
var sh = require('./sh'); | ||
|
||
sh.rm('./out/src'); | ||
sh.mkdir('./out/src'); | ||
sh.exec('./node_modules/.bin/babel --out-dir out/src src'); | ||
sh.chmod('./out/src/ESDocCLI.js', '755'); | ||
sh.cp('./src/Publisher/Builder/template/', './out/src/Publisher/Builder/template/'); | ||
|
||
// build test | ||
sh.rm('./out/test/src'); | ||
sh.mkdir('./out/test/src'); | ||
sh.exec('./node_modules/.bin/babel --out-dir out/test/src test/src'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env node | ||
var path = require('path'); | ||
var sh = require('./sh'); | ||
|
||
var esdoc = path.resolve(__dirname, '..', 'src', 'ESDocCLI.js'); | ||
var babel = path.resolve(__dirname, '..', 'node_modules', '.bin', 'babel-node'); | ||
var arg = [].concat(process.argv).splice(2); | ||
var cmd = [babel, esdoc].concat(arg).join(' '); | ||
sh.exec(cmd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env node | ||
var sh = require('./sh'); | ||
|
||
sh.rm('./doc/out/esdoc'); | ||
sh.mkdir('./doc/out/esdoc'); | ||
sh.exec('./node_modules/.bin/babel-node ./src/ESDocCLI.js -c esdoc.json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env node | ||
var sh = require('./sh'); | ||
|
||
sh.exec('./node_modules/.bin/http-server ./ -p 8080 -c -1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var fs = require('fs-extra'); | ||
var path = require('path'); | ||
var child_process = require('child_process'); | ||
|
||
function rm(path) { | ||
fs.removeSync(path); | ||
} | ||
|
||
function mkdir(path) { | ||
fs.mkdirs(path); | ||
} | ||
|
||
function exec(cmd) { | ||
cmd = cmd.replace(/\//g, path.sep); | ||
child_process.execSync(cmd, {stdio: 'inherit'}); | ||
} | ||
|
||
function chmod(path, mode) { | ||
fs.chmodSync(path, mode); | ||
} | ||
|
||
function cp(src, dst) { | ||
fs.copySync(src, dst); | ||
} | ||
|
||
module.exports.rm = rm; | ||
module.exports.mkdir = mkdir; | ||
module.exports.exec = exec; | ||
module.exports.chmod = chmod; | ||
module.exports.cp = cp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env node | ||
var sh = require('./sh'); | ||
|
||
// judge node or io because run test with node and io on TRAVIS. | ||
// send coverage report with only node. | ||
var isNodeJS = process.version.indexOf('v0.12.') === 0; | ||
var mochaOption=" -t 10000 --recursive ./out/test/src -R spec"; | ||
|
||
sh.exec('node ./script/build.js'); | ||
|
||
if (process.env.TRAVIS && isNodeJS) { | ||
sh.exec('./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- ' + mochaOption + ' && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js'); | ||
} else if(process.argv.indexOf('--coverage') !== -1) { | ||
sh.exec('./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- ' + mochaOption); | ||
} else { | ||
sh.exec('./node_modules/.bin/mocha' + mochaOption); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env node | ||
var sh = require('./sh'); | ||
|
||
// judge node or io because run test with node and io on TRAVIS. | ||
// send coverage report with only node. | ||
var isNodeJS = process.version.indexOf('v0.12.') === 0; | ||
var mochaOption=" -t 10000 --require ./node_modules/babel/register.js --recursive ./test/src -R spec"; | ||
|
||
if (process.env.TRAVIS && isNodeJS) { | ||
sh.exec('./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- ' + mochaOption + ' && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js'); | ||
} else if(process.argv.indexOf('--coverage') !== -1) { | ||
sh.exec('./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- ' + mochaOption); | ||
} else { | ||
sh.exec('./node_modules/.bin/mocha' + mochaOption); | ||
} |