{"id":13548854,"url":"https://github.com/pirxpilot/postcss-cli","last_synced_at":"2025-04-05T12:03:39.520Z","repository":{"id":28538540,"uuid":"32055542","full_name":"pirxpilot/postcss-cli","owner":"pirxpilot","description":"Simple CLI for postcss","archived":false,"fork":false,"pushed_at":"2024-02-06T14:09:56.000Z","size":169,"stargazers_count":175,"open_issues_count":1,"forks_count":17,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-05-23T05:32:11.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-12T03:43:29.000Z","updated_at":"2024-06-18T15:33:08.256Z","dependencies_parsed_at":"2024-06-18T15:32:58.221Z","dependency_job_id":"89341073-40c8-4e75-a910-07e52e5f2d8b","html_url":"https://github.com/pirxpilot/postcss-cli","commit_stats":{"total_commits":147,"total_committers":14,"mean_commits":10.5,"dds":0.4965986394557823,"last_synced_commit":"c77cb7273fdffacc1ef645ed144b0887b93ebcb1"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpostcss-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpostcss-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpostcss-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpostcss-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/postcss-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332560,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:15.196Z","updated_at":"2025-04-05T12:03:39.490Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n# postcss-cli-simple\n\nSimple CLI for [postcss]. To be used in Makefiles. If you are looking for more options check out [postcss-cli].\nMore on the [history of this project][history].\n\n## Installation\n\nnpm install postcss-cli-simple\n\n## Usage\n\n    postcss [options] -o output-file input-file\n\nIn Makefile you can use it with [pattern rules]:\n\n````Make\ndeploy/%.css: %.css\n  ./node_modules/.bin/postcss \\\n    --use postcss-url --postcss-url.url=rebase \\\n    --use autoprefixer --autoprefixer.browsers \"\u003e 5%\" \\\n    --use cssnano --no-cssnano.discardUnused\n    --output $@ $\u003c\n````\n\n#### `--output|-o`\n\nOutput file name.\n\n#### `--use|-u`\n\nPlugin to be used. Multiple plugins can be specified. At least one plugin needs to be specified either with `--use` option or in the config file.\n\nPlugin options can be specified using [yargs dot notation]. For example, to pass `browsers` option to `autoprefixer` one can use `--autoprefixer.browsers \"\u003e 5%\"`. To set plugin option to `false` use [yargs boolean negation]. For example, to switch off `discardUnused` in `cssnano` try: `--no-cssnano.discardUnused`.  \n\n#### `--map|-m`\n\nActivate source map generation. By default inline maps are generated. To generate source maps\nin a separate _.map_ file use `--map file` or `--no-map.inline`.\n\nYou can use [advances source map options][source-map-options] - some examples:\n\n- `--no-map` - do not generated source maps - even if previous maps exist\n- `--map.annotation \u003cpath\u003e` - specify alternaive path to be used in source map annotation appended to CSS\n- `--no-map.annotation` - supress adding annotation to CSS\n- `--no-map.sourcesContent` - remove origin CSS from maps\n\n#### `--config|-c`\n\nJSON file with plugin configuration. Plugin names should be the keys.\n\n````json\n{\n    \"autoprefixer\": {\n        \"browsers\": \"\u003e 5%\"\n    },\n    \"postcss-cachify\": {\n        \"baseUrl\": \"/res\"\n    }\n}\n````\n\nJavaScript configuration can be used if functions are allowed as plugins parameters. Although you might be better off writing your own plugin.\n\n````js\nmodule.exports = {\n  \"postcss-url\": {\n    url: function(url) { return \"http://example.com/\" + url; }\n  },\n  autoprefixer: {\n    browsers: \"\u003e 5%\"\n  }\n};\n````\n\nAlternatively configuration options can be passed as `--plugin.option` parameters.\n\nNote that command-line options can also be specified in the config file:\n\n````json\n{\n    \"use\": [\"autoprefixer\", \"postcss-cachify\"],\n    \"output\": \"bundle.css\",\n    \"autoprefixer\": {\n        \"browsers\": \"\u003e 5%\"\n    },\n    \"postcss-cachify\": {\n        \"baseUrl\": \"/res\"\n    }\n}\n````\n\n#### `--syntax|-s`\n\nOptional module to use as a [custom PostCSS syntax](https://github.com/postcss/postcss#syntaxes).\n\n#### `--parser|-p`\n\nOptional module to use as a [custom PostCSS input parser](https://github.com/postcss/postcss#syntaxes).\n\n#### `--stringifier|-t`\n\nOptional module to use as a [custom PostCSS output stringifier](https://github.com/postcss/postcss#syntaxes).\n\n#### `--help|-h`\n\nShow help\n\n### Examples\n\nUse autoprefixer as a postcss plugin pass parameters from a json file\n\n    postcss --use autoprefixer -c options.json -o screen.css screen.css\n\nUse more than one plugin and pass config parameters\n\n    postcss --use autoprefixer --autoprefixer.browsers \"\u003e 5%\" \\\n        --use postcss-cachify --postcss-cachify.baseUrl /res \\\n        -o screen.css screen.css\n\n\n## License\n\nMIT\n\n[postcss]: https://npmjs.org/package/postcss\n[postcss-cli]: https://npmjs.org/package/postcss-cli\n[history]: https://github.com/postcss/postcss/issues/154#issuecomment-177278640\n[source-map-options]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md\n[pattern rules]: https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html\n[yargs dot notation]: https://www.npmjs.com/package/yargs#dot-notation\n[yargs boolean negation]: https://www.npmjs.com/package/yargs#negate-fields\n\n\n[npm-image]: https://img.shields.io/npm/v/postcss-cli-simple\n[npm-url]: https://npmjs.org/package/postcss-cli-simple\n\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/postcss-cli/check.yaml?branch=main\n[build-url]: https://github.com/pirxpilot/postcss-cli/actions/workflows/check.yaml\n \n[deps-image]: https://img.shields.io/librariesio/release/npm/postcss-cli-simple\n[deps-url]: https://libraries.io/npm/postcss-cli-simple\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fpostcss-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fpostcss-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fpostcss-cli/lists"}