{"name":"postcss-cli","version":"6.0.0","description":"CLI for PostCSS","main":"index.js","engines":{"node":">=6"},"bin":{"postcss":"./bin/postcss"},"scripts":{"ci":"eslint . && nyc ava -v && npm run prettier -- --list-different","clean":"node test/helpers/clean.js","prettier":"prettier --single-quote --no-semi **/*.{js,md}","format":"npm run prettier -- --write && eslint . --fix","pretest":"npm run clean && npm run format","test":"nyc ava -v"},"dependencies":{"chalk":"^2.1.0","chokidar":"^2.0.0","dependency-graph":"^0.7.0","fs-extra":"^7.0.0","get-stdin":"^6.0.0","globby":"^8.0.0","postcss":"^7.0.0","postcss-load-config":"^2.0.0","postcss-reporter":"^5.0.0","pretty-hrtime":"^1.0.3","read-cache":"^1.0.0","yargs":"^12.0.1"},"devDependencies":{"ava":"^0.25.0","coveralls":"^3.0.0","eslint":"^5.0.0","eslint-config-problems":"1.0.0","nyc":"^11.0.2","postcss-import":"^11.0.0","prettier":"~1.13.0","sugarss":"^1.0.0","uuid":"^3.0.1"},"files":["bin","index.js","lib"],"keywords":["cli","postcss","postcss-runner"],"contributors":[{"name":"Michael Ciniawky","email":"michael.ciniawsky@gmail.com"},{"name":"Ryan Zimmermann","email":"opensrc@ryanzim.com"}],"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-cli.git"},"bugs":{"url":"https://github.com/postcss/postcss-cli/issues"},"homepage":"https://github.com/postcss/postcss-cli#readme","license":"MIT","gitHead":"52bce09f731fcd60a6b1a176eaba548f4c89b740","_id":"postcss-cli@6.0.0","_npmVersion":"5.6.0","_nodeVersion":"10.1.0","_npmUser":{"name":"ryanzim","email":"opensrc@ryanzim.com"},"dist":{"integrity":"sha512-7DuxMn1Wj6dJKbjKpZXOdAc5nl5NfPXiJbg0m/+tdObPvgk1xv4+lZgNKD3jL/kCrDRPf1jgFlmq1cHh8lBR2w==","shasum":"688e3750735a7bc21ea6e2f0e427f5f873c16f0b","tarball":"http://registry-npm.ywwl.com/postcss-cli/download/postcss-cli-6.0.0.tgz","fileCount":8,"unpackedSize":28173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT7hyCRA9TVsSAnZWagAAoDUQAJhlu0jVwv4IjNJxvIdF\nxQ7swjykbIMDvx0/fjxy4NSKYN8VLw2HxNQeqSxycI4JjjDGarikhw2FK5ra\n7gMxpztbCDexWf24QZh4a2vOzhGI66mQi9dq85HJesxVIoQQ79TAL2ArgnMo\nmlFSHpbsGke73MzsPR4jUxl3YK5jY7KKedhWJpJQqGEdMrYsDZqJOJlLNmQY\nHpEYNGiEW3Fu19jwklbvfQzaZECN/FiuF3Jk/J1FDLo6Tk3+oVrW7oXOxy1j\nm21XJv73vR40EeWkRjQVOXWMNLoxAjW+7ABX7ytSX1eK5RRdtt1whFNEDGqd\nO+G59/lERDPjHmKnouxgldeis/WEl2WwQFwdHIsm7NhJZcoSKhyZoyYh+x8X\nSlzCicyEbJmjsUmGldD7rpOAbw9sdWluzffQBIbyjnEtJ92Gi8NQmboNYuLc\nbFNHZaJsIALAj06QJ4YY1uJor8MJFjUTgVlo2bEvdFtWW+Id+XFFJHDP0wuI\nJ0LGAteOhKUAnMNxSviD10JKNGnVRvu1GHk2GxJlmhFenYHolYSLZiKtg4UU\n9rn+0XsUXG8GWA84WPfja2lIqQKQOJ6f6Ww0B36pNweybwz9EAWHer5vzCjO\nhXvw2ObHqksr97Obq4Uv/3q7FtVu5BtJkkw425cchwbW95xOJk2LUQrCQRSo\nIZ7n\r\n=BS18\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF33/mv/sdgmDS9wA/euoaKO8JhkpuBq2XGwHTQf1QZUAiEAzqu4kr9QtEwH9rAEZiXl+wZ4gGrW8EjaX4BuoKeE2rY="}],"size":9141,"noattachment":false,"key":"/postcss-cli/-/postcss-cli-6.0.0.tgz"},"maintainers":[{"name":"ai","email":"andrey@sitnik.ru"},{"name":"pirxpilot","email":"pirxpilot@furkot.com"},{"name":"ryanzim","email":"opensrc@ryanzim.com"},{"name":"watilde","email":"daijiro.wachi@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-cli_6.0.0_1531951218597_0.6781890298830859"},"_hasShrinkwrap":false,"readme":"[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n<div align=\"center\">\n  <img width=\"100\" height=\"100\" title=\"CLI\" src=\"https://raw.githubusercontent.com/postcss/postcss-cli/HEAD/logo.svg\">\n  <a href=\"https://github.com/postcss/postcss\">\n    <img width=\"110\" height=\"110\" title=\"PostCSS\" src=\"http://postcss.github.io/postcss/logo.svg\" hspace=\"10\">\n  </a>\n  <h1>PostCSS CLI</h1>\n</div>\n\n<h2 align=\"center\">Install</h2>\n\n```bash\nnpm i -D postcss postcss-cli\n```\n\n<h2 align=\"center\">Usage</h2>\n\n```\nUsage:\n  postcss [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]\n  postcss <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]\n  postcss <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]\n  postcss <input-glob-pattern> [OPTIONS] --dir <output-directory> [--watch|-w]\n  postcss <input.css>... [OPTIONS] --replace\n\nBasic options:\n  -o, --output   Output file                                            [string]\n  -d, --dir      Output directory                                       [string]\n  -r, --replace  Replace (overwrite) the input file                    [boolean]\n  -m, --map      Create an external sourcemap\n  --no-map       Disable the default inline sourcemaps\n  -w, --watch    Watch files for changes and recompile as needed       [boolean]\n  --verbose      Be verbose                                            [boolean]\n  --env          A shortcut for setting NODE_ENV                        [string]\n\nOptions for use without a config file:\n  -u, --use      List of postcss plugins to use                          [array]\n  --parser       Custom postcss parser                                  [string]\n  --stringifier  Custom postcss stringifier                             [string]\n  --syntax       Custom postcss syntax                                  [string]\n\nOptions for use with --dir:\n  --ext   Override the output file extension; for use with --dir        [string]\n  --base  Mirror the directory structure relative to this path in the output\n          directory, for use with --dir                                 [string]\n\nAdvanced options:\n  --include-dotfiles  Enable glob to match files/dirs that begin with \".\"\n                                                                       [boolean]\n  --poll              Use polling for file watching. Can optionally pass polling\n                      interval; default 100 ms\n  --config            Set a custom directory to look for a config file  [string]\n\nOptions:\n  --version   Show version number                                      [boolean]\n  -h, --help  Show help                                                [boolean]\n\nExamples:\n  postcss input.css -o output.css                       Basic usage\n  postcss src/**/*.css --base src --dir build           Glob Pattern & output\n  cat input.css | postcss -u autoprefixer > output.css  Piping input & output\n\nIf no input files are passed, it reads from stdin. If neither -o, --dir, or\n--replace is passed, it writes to stdout.\n\nIf there are multiple input files, the --dir or --replace option must be passed.\n\nInput files may contain globs (e.g. src/**/*.css). If you pass an input\ndirectory, it will process all files in the directory and any subdirectories,\nrespecting the glob pattern.\n```\n\n> ℹ️ More details on custom parsers, stringifiers and syntaxes, can be found [here](https://github.com/postcss/postcss#syntaxes).\n\n### [Config](https://github.com/michael-ciniawsky/postcss-load-config)\n\nIf you need to pass options to your plugins, or have a long plugin chain, you'll want to use a configuration file.\n\n**postcss.config.js**\n\n```js\nmodule.exports = {\n  parser: 'sugarss',\n  plugins: [\n    require('postcss-import')({ ...options }),\n    require('postcss-url')({ url: 'copy', useHash: true }),\n  ],\n}\n```\n\nNote that you **can not** set the `from` or `to` options for postcss in the config file. They are set automatically based on the CLI arguments.\n\n### Context\n\nFor more advanced usage, it's recommended to use a function in `postcss.config.js`; this gives you access to the CLI context to dynamically apply options and plugins **per file**\n\n|   Name    |    Type    |              Default               | Description          |\n| :-------: | :--------: | :--------------------------------: | :------------------- |\n|   `env`   | `{String}` |          `'development'`           | process.env.NODE_ENV |\n|  `file`   | `{Object}` |    `dirname, basename, extname`    | File                 |\n| `options` | `{Object}` | `map, parser, syntax, stringifier` | PostCSS Options      |\n\n**postcss.config.js**\n\n```js\nmodule.exports = (ctx) => ({\n  map: ctx.options.map,\n  parser: ctx.file.extname === '.sss' ? 'sugarss' : false,\n  plugins: {\n    'postcss-import': { root: ctx.file.dirname },\n    cssnano: ctx.env === 'production' ? {} : false,\n  },\n})\n```\n\n> ⚠️ If you want to set options via CLI, it's mandatory to reference `ctx.options` in `postcss.config.js`\n\n```bash\npostcss input.sss -p sugarss -o output.css -m\n```\n\n**postcss.config.js**\n\n```js\nmodule.exports = (ctx) => ({\n  map: ctx.options.map,\n  parser: ctx.options.parser,\n  plugins: {\n    'postcss-import': { root: ctx.file.dirname },\n    cssnano: ctx.env === 'production' ? {} : false,\n  },\n})\n```\n\n[npm]: https://img.shields.io/npm/v/postcss-cli.svg\n[npm-url]: https://npmjs.com/package/postcss-cli\n[node]: https://img.shields.io/node/v/postcss-cli.svg\n[node-url]: https://nodejs.org/\n[tests]: https://img.shields.io/github/workflow/status/postcss/postcss-cli/Node.js%20CI/master\n[tests-url]: https://github.com/postcss/postcss-cli/actions?query=branch%3Amaster\n[cover]: https://img.shields.io/coveralls/postcss/postcss-cli/master.svg\n[cover-url]: https://coveralls.io/github/postcss/postcss-cli\n[chat]: https://img.shields.io/gitter/room/postcss/postcss.svg\n[chat-url]: https://gitter.im/postcss/postcss\n","publish_time":1531951218738,"_cnpm_publish_time":1531951218738,"dist-tags":{"latest":"12.0.0"}}