Skip to content

Commit

Permalink
build(Travis CI): ignore TTY commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gerard2perez committed Oct 25, 2017
1 parent 8d31342 commit 09dc87b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"eslint:live": "npm run eslint & chokidar src -c \"cls && npm run eslint\"",
"eslint": "eslint .",
"export": "koaton-exporter src/*.js src/**/*.js ./ -r src/ -t v2",
"test": "cross-env NODE_ENV=koaton mocha test/integration.js --compilers js:babel-register",
"test": "cross-env NODE_ENV=koaton mocha test/unit/**/*.js test/integration.js --compilers js:babel-register",
"test:live": "npm t -- -w",
"cover": "nyc npm t",
"cover:watch": "npm run cover & chokidar src test -c \"cls & npm run cover\"",
Expand Down
14 changes: 10 additions & 4 deletions src/functions/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ export async function buildCSS (target, bundle, development, onlypaths, logger)
}
utils.writeuseslog = undefined;
let [seconds, nanoseconds] = process.hrtime(start);
process.stdout.clearLine();
process.stdout.cursorTo(0);
/* istanbul ignore next */
if (process.stdout.isTTY) {
process.stdout.clearLine();
process.stdout.cursorTo(0);
}
console.log(` ${__ok.green} ${target} ${(seconds * 1000) + Math.ceil(nanoseconds / 1e6)} ms`);
if (error.length > 0) {
console.log(error.join('\n'));
Expand Down Expand Up @@ -182,8 +185,11 @@ export async function buildJS (target, bundle, development, onlypaths, logger) {
utils.writeuseslog = undefined;
scfg.bundles.remove(ITEM).add(ITEM);
let [seconds, nanoseconds] = process.hrtime(start);
process.stdout.clearLine();
process.stdout.cursorTo(0);
/* istanbul ignore next */
if (process.stdout.isTTY) {
process.stdout.clearLine();
process.stdout.cursorTo(0);
}
console.log(` ${__ok.green} ${target} ${(seconds * 1000) + Math.ceil(nanoseconds / 1e6)} ms`);
if (error.length > 0) {
console.log(error.join('\n'));
Expand Down

0 comments on commit 09dc87b

Please sign in to comment.