sails-hook-postcss
v1.1.0
Published
Compile CSS with Postcss and watch for changes.
Downloads
3
Readme
sails-hook-postcss
A Sails hook for processing your Sails application’s CSS with Postcss.
Postcss will attempt to compile your CSS once when your application lifts and will then watch your assets directory for changes to CSS files and recompile. When the NODE_ENV
is set to “production”, the hook will only compile the CSS once when the application is lifted.
Installation
Add sails-hook-postcss
to your devDependencies
in your package.json
and Sails will load it when lifting your application.
Create a configuration file config/postcss.js
to specify the plugins you’d like to use. It should look something like the following:
var cssnext = require(‘cssnext’);
module.exports.postcss = {
plugins: [
cssnext(),
]
};