8000 add quiet flag to have a more "quiet" output. by Makio64 · Pull Request #2088 · stylus/stylus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add quiet flag to have a more "quiet" output. #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions bin/stylus
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ var print = false;

var firebug = false;

/**
* Quiet flag
C6E7 */

var quiet = false;

/**
* Sourcemap flag
*/
Expand Down Expand Up @@ -172,9 +178,10 @@ var usage = [
, ' -d, --compare Display input along with output'
, ' -f, --firebug Emits debug infos in the generated CSS that'
, ' can be used by the FireStylus Firebug plugin'
, ' -l, --line-numbers Emits comments in the generated CSS'
, ' -l, --line-numbers Emits comments in the generated CSS'
, ' indicating the corresponding Stylus line'
, ' -m, --sourcemap Generates a sourcemap in sourcemaps v3 format'
, ' -q, --quiet Less noisy output'
, ' --sourcemap-inline Inlines sourcemap with full source text in base64 format'
, ' --sourcemap-root <url> "sourceRoot" property of the generated sourcemap'
, ' --sourcemap-base <path> Base <path> from which sourcemap and all sources are relative'
Expand Down Expand Up @@ -228,6 +235,10 @@ while (args.length) {
case '--sourcemap':
sourcemap = {};
break;
case '-q':
case '--quiet':
quiet = true;
break;
case '--sourcemap-inline':
sourcemap = sourcemap || {};
sourcemap.inline = true;
Expand Down Expand Up @@ -746,7 +757,9 @@ function watch(file, rootFile) {
console.error('Stylus CLI Error: Watch and print cannot be used together');
process.exit(1);
}
console.log(' \033[90mwatching\033[0m %s', file);
if(!quiet){
console.log(' \033[90mwatching\033[0m %s', file);
}
// if is windows use fs.watch api instead
// TODO: remove watchFile when fs.watch() works on osx etc
if (isWindows) {
Expand Down
0