Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-cli

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-cli - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

test/check

8

History.md
0.2.0 / 2015-03-13
==================
* use autoprefixer instead of autoprefixer-core
* change short options for --use from `p` to `u`
* add -v|--version support
* add --safe option to enable postcss safe mode
0.1.0 / 2015-03-11

@@ -3,0 +11,0 @@ ==================

22

index.js
var argv = require("yargs")
.usage('Usage: $0 -use|-p plugin [--config|-c config.json] --output|-o output.css input.css')
.example('postcss --use autoprefixer-core -c options.json -o screen.css screen.css',
.example('postcss --use autoprefixer -c options.json -o screen.css screen.css',
'Use autoprefixer as a postcss plugin')
.example('postcss --use autoprefixer-core --autoprefixer-code.browsers "> 5%" -o screen.css screen.css',
.example('postcss --use autoprefixer --autoprefixer.browsers "> 5%" -o screen.css screen.css',
'Pass plugin parameters in plugin.option notation')

@@ -11,9 +11,18 @@ .demand(1, 'Please specify input file.')

.describe('c', 'JSON file with plugin configuration')
.alias('p', 'use')
.describe('p', 'postcss plugin name (can be used multiple times)')
.demand('p', 'Please specify at least one plugin name.')
.alias('u', 'use')
.describe('u', 'postcss plugin name (can be used multiple times)')
.demand('u', 'Please specify at least one plugin name.')
.alias('o', 'output')
.describe('o', 'Output file')
.demand('o', 'Please specify output file.')
.requiresArg(['p', 'c', 'o'])
.requiresArg(['u', 'c', 'o'])
.boolean('safe')
.describe('safe', 'Enable postcss safe mode.')
.version(function() {
return [
'postcss version',
require('./node_modules/postcss/package.json').version
].join(' ')
}, 'v')
.alias('v', 'version')
.help('h')

@@ -50,2 +59,3 @@ .alias('h', 'help')

var result = processor.process(css, {
safe: argv.safe,
from: input,

@@ -52,0 +62,0 @@ to: output

{
"name": "postcss-cli",
"version": "0.1.0",
"version": "0.2.0",
"description": "CLI for postcss",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,7 +13,7 @@ # postcss-cli

#### `-o, --output`
#### `--output|-o`
Output file name - required
#### `--use|-p`
#### `--use|-u`

@@ -28,3 +28,3 @@ Plugin to be used. Multiple plugins can be specified. At least one is required.

{
"autoprefixer-core": {
"autoprefixer": {
"browsers": "> 5%"

@@ -40,2 +40,6 @@ },

### `--safe`
Enable Safe Mode, in which PostCSS will try to fix CSS syntax errors.
#### `-h, --help`

@@ -49,7 +53,7 @@

postcss --use autoprefixer-core -c options.json -o screen.css screen.css
postcss --use autoprefixer -c options.json -o screen.css screen.css
Use more than one plugin and pass config parameters
postcss --use autoprefixer-core --autoprefixer-code.browsers "> 5%" \
postcss --use autoprefixer --autoprefixer.browsers "> 5%" \
--use postcss-cachify --postcss-cachify.baseUrl /res \

@@ -62,2 +66,2 @@ -o screen.css screen.css

[postcss]: https://github.com/postcss/postcss
[postcss]: https://github.com/postcss/postcss
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc