postcss-cli
Advanced tools
Comparing version 2.5.2 to 2.6.0
@@ -0,1 +1,16 @@ | ||
2.6.0 / 2016-08-30 | ||
================== | ||
* Add log option | ||
* Update postcss-import to v8.1.2 from v7.1.0 | ||
* Update globby to v4.1.0 from v3.0.1 | ||
* Update postcss-url to v5.1.2 from v4.0.0 | ||
* Update jshint to v2.9.2 from v2.6.3 | ||
* Update chokidar to v1.5.1 from v1.0.3 | ||
* Update yargs to v4.7.1 from v3.32.0 | ||
* Support es6 export | ||
* Allow running without plugins | ||
* Add test for --poll | ||
* Add --poll flag | ||
2.5.2 / 2016-04-18 | ||
@@ -2,0 +17,0 @@ ================== |
34
index.js
@@ -33,4 +33,10 @@ var globby = require("globby"); | ||
.describe('p', 'Alternative CSS parser') | ||
.option('poll', { | ||
describe: 'Use polling to monitor for changes.', | ||
default: false, | ||
}) | ||
.alias('t', 'stringifier') | ||
.describe('t', 'Alternative output stringifier') | ||
.alias('l', 'log') | ||
.describe('l', 'Log when file is written') | ||
.alias('w', 'watch') | ||
@@ -44,3 +50,3 @@ .describe('w', 'auto-recompile when detecting source changes') | ||
].join(' '); | ||
}, 'v') | ||
}) | ||
.alias('v', 'version') | ||
@@ -50,5 +56,2 @@ .help('h') | ||
.check(function(argv) { | ||
if (!argv.use) { | ||
throw 'Please specify at least one plugin name.'; | ||
} | ||
if (argv._.length && argv.input) { | ||
@@ -106,5 +109,10 @@ throw 'Both positional arguments and --input option used for `input file`: please only use one of them.'; | ||
plugin = require(resolved); | ||
} else if (name) { | ||
plugin = require(name); | ||
} else { | ||
plugin = require(name); | ||
return null; | ||
} | ||
if (plugin.default && typeof plugin.default === 'function') { | ||
plugin = plugin.default; | ||
} | ||
if (name in argv) { | ||
@@ -139,3 +147,3 @@ plugin = plugin(argv[name]); | ||
var postcss = require('postcss'); | ||
var processor = postcss(plugins); | ||
var processor = plugins[0] ? postcss(plugins) : postcss(); | ||
var mkdirp = require('mkdirp'); | ||
@@ -154,4 +162,12 @@ | ||
var index = {}; // source files by entry point | ||
var opts = {}; | ||
var watcher = require('chokidar').watch(watchedFiles); | ||
if (argv.poll) { | ||
opts.usePolling = true; | ||
} | ||
if (typeof argv.poll === 'number') { | ||
opts.interval = argv.poll; | ||
} | ||
var watcher = require('chokidar').watch(watchedFiles, opts); | ||
// recompile if any watched file is modified | ||
@@ -264,4 +280,8 @@ // TODO: only recompile relevant entry point | ||
fs.writeFile(name, content, fn); | ||
if (argv.log) { | ||
console.log('Generated file: ' + name); | ||
} | ||
} | ||
}); | ||
} |
{ | ||
"name": "postcss-cli", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"description": "CLI for postcss", | ||
@@ -21,3 +21,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"globby": "^3.0.1", | ||
"globby": "^4.1.0", | ||
"mkdirp": "^0.5.1", | ||
@@ -28,12 +28,12 @@ "neo-async": "^1.0.0", | ||
"resolve": "^1.1.6", | ||
"yargs": "^3.32.0" | ||
"yargs": "^4.7.1" | ||
}, | ||
"optionalDependencies": { | ||
"chokidar": "^1.0.3" | ||
"chokidar": "^1.5.1" | ||
}, | ||
"devDependencies": { | ||
"jshint": "^2.6.3", | ||
"postcss-import": "^7.1.0", | ||
"postcss-url": "^4.0.0" | ||
"jshint": "^2.9.2", | ||
"postcss-import": "^8.1.2", | ||
"postcss-url": "^5.1.2" | ||
} | ||
} |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16981
252
0
+ Addedcamelcase@3.0.0(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedfind-up@1.1.2(transitive)
+ Addedget-caller-file@1.0.3(transitive)
+ Addedglob@6.0.4(transitive)
+ Addedglobby@4.1.0(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedload-json-file@1.1.0(transitive)
+ Addedlodash.assign@4.2.0(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addedparse-json@2.2.0(transitive)
+ Addedpath-exists@2.1.0(transitive)
+ Addedpath-type@1.1.0(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedread-pkg@1.1.0(transitive)
+ Addedread-pkg-up@1.0.1(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@1.0.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedwhich-module@1.0.0(transitive)
+ Addedwindow-size@0.2.0(transitive)
+ Addedyargs@4.8.1(transitive)
+ Addedyargs-parser@2.4.1(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedglob@5.0.15(transitive)
- Removedglobby@3.0.1(transitive)
- Removedpinkie@1.0.0(transitive)
- Removedpinkie-promise@1.0.0(transitive)
- Removedwindow-size@0.1.4(transitive)
- Removedyargs@3.32.0(transitive)
Updatedglobby@^4.1.0
Updatedyargs@^4.7.1