Comparing version 0.2.0 to 0.2.1
15
cli.js
@@ -6,3 +6,4 @@ #!/usr/bin/env node | ||
jsonfilter = require('jsonfilter'), | ||
through = require('through2'); | ||
through = require('through2'), | ||
browserslist = require('browserslist'); | ||
@@ -44,7 +45,10 @@ var formatBrowserName = require('./dist/lib/util').formatBrowserName, | ||
argv.browsers = argv.browsers.split(',').map(function(s){return s.trim();}); | ||
// Informational output | ||
if(argv.l) { argv.v = ++argv.verbose; } | ||
if(argv.verbose >= 1) { | ||
browsers = linter.info().browsers | ||
browsers = browserslist(argv.browsers) | ||
console.log('[doiuse] Browsers: ' + browsers.map(function(b) { | ||
b = b.split(' ') | ||
b[0] = formatBrowserName(b[0]) | ||
@@ -75,3 +79,2 @@ return b.join(' ') | ||
var browsers = argv.b.split(',').map(function(s){return s.trim();}); | ||
var options = {messages: !argv.json}; | ||
@@ -92,4 +95,4 @@ | ||
argv._.forEach(function(file){ | ||
fs.createReadStream() | ||
.pipe(doiuse(browsers, options)) | ||
fs.createReadStream(file) | ||
.pipe(doiuse(argv.browsers, options)) | ||
.pipe(out); | ||
@@ -99,3 +102,3 @@ }); | ||
process.stdin | ||
.pipe(doiuse(browsers, options)) | ||
.pipe(doiuse(argv.browsers, options)) | ||
.pipe(out); |
{ | ||
"name": "doiuse", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Lint CSS for browser support against caniuse database.", | ||
@@ -47,2 +47,2 @@ "main": "dist/index.js", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61034
71
1159
1