POSTCSS(1)
π POSTCSS π
okay bestie, gather round, because postcss is literally the command-line client for node??-postcss and it's giving main character energy from the very first flag. πβ¨
π¦ DESCRIPTION π¦
the usage, bestie</p>
fr fr, here's how you call on it:
postcss [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
postcss <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]
postcss <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]
postcss <input-glob-pattern> [OPTIONS] --dir <output-directory> [--watch|-w]
postcss <input.css>... [OPTIONS] --replace
like. five whole ways to show up. pick your vibe. π
β¨ Basic options β¨
-o,--outputβ the output file. that's it, that's the whole job.[string]π-d,--dirβ the output directory, sis. plural energy.[string]-r,--replaceβ replace (overwrite) the input file. yes, overwrite, like it said.[boolean]π-m,--mapβ make an external sourcemap. fancy map, outside the file. πΊοΈ--no-mapβ turn off the default inline sourcemaps. not me disabling the defaultβ¦ π-w,--watchβ watch the files for changes and recompile whenever they need it. it's giving devoted.[boolean]π--verboseβ be verbose. spill the tea, bestie.[boolean]π¬--envβ a shortcut for settingNODE_ENV.[string]π±
π§ Options for use without a config file π§
-u,--useβ a list of postcss plugins to use.[array]π₯--parserβ custom postcss parser.[string]--stringifierβ custom postcss stringifier.[string]--syntaxβ custom postcss syntax.[string]
π Options for use with --dir π
--extβ override the output file extension; for use with--dir.[string]--baseβ mirror the directory structure relative to this path in the output directory, for use with--dir.[string]
π Advanced options π
--include-dotfilesβ enable glob to match files/dirs that begin with".". yes, the sneaky ones.[boolean]--pollβ use polling for file watching. you can optionally pass a polling interval; default100 ms. β±οΈ--configβ set a custom directory to look for a config file.[string]ποΈ
πΈ OPTIONS πΈ
lowkey these two are the homies you'll use every single time:
--versionβ show version number.[boolean]π-h,--helpβ show help. your emergency bestie.[boolean]π
π₯ EXAMPLES π₯
basic usage, periodt
postcss input.css -o output.css
glob pattern & output π¦
postcss src/**/*.css --base src --dir build
piping input & output π
cat input.css | postcss -u autoprefixer > output.css
π the important little notes π
so if no input files are passed, it reads from stdin. and if neither -o, --dir, or --replace is passed, it writes to stdout. no cap. π«Ά
if there are multiple input files, you must pass the --dir or the --replace option. like, non-negotiable bestie. π€¨
input files may contain globs (e.g. src/**/*.css). and if you pass an input directory, it will process all files in the directory and any subdirectories, respecting the glob pattern. it's thorough like that. π
for more details, please see https://github.com/postcss/postcss-cli β
okay that's the whole manual, you're basically a postcss girlie now. go compile something iconic. π§ββοΈ
this has been postcss 16.2.0, from November 2024 π mwah, bye bestie, see u at the next build π
π¦ where this page comes from
- debian trixie: node-postcss-cli 10.1.0+~cs16.11.1-2 Β· MIT
- ubuntu resolute: node-postcss-cli 10.1.0+~cs16.11.1-2 Β· MIT
- ubuntu stonking: node-postcss-cli 10.1.0+~cs16.11.1-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms