borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

How to use postcss-assets in npm script #76

Closed crisfcodes closed 7 years ago

crisfcodes commented 7 years ago

Hi, i have a question. How can I use the plugion assets in npm script?, and how can I set its options?

Something like this?

"scripts": { "assets": "postcss -u postcss-assets --relative ./public --base-path ./public --load-path ['/fonts'] -r ./public/css/style.css" }

borodean commented 7 years ago

@cristian05 you have to create a postcss.config.js file: https://github.com/postcss/postcss-cli#config