0.1.0 • Published 9 years ago
prefixless v0.1.0
prefixless
Combines the Less preprocessor with the Autoprefixer postprocessor.
Status
You're feeling lucky.
Installation
$ npm install prefixless
Configuration
{Array} browsers
- default value: 'last 2 versions'
- cf. browserlist queries
{string} source
- default value: './source/style'
- all less files that match
*.less
in this directory generate output files; includes must be in sub-directories
{string} target
- default value: './public/style'
CLI usage
package.json
config.prefixless
values (if any) are merged with the default values.
{
"config": {
"prefixless": {
"browsers": [
"any browserlist query"
],
"source": "path/to/source",
"target": "path/to/target"
}
},
"scripts": {
"css": "prefixless",
"css:watch": "prefixless watch"
}
}
Terminal
$ npm run css
or
$ npm run css:watch
Programatic usage
var prefixless = require('prefixless');
var options = {
browsers: [
'any browserlist query'
],
source: 'path/to/source',
source: 'path/to/target'
}
prefixless(options)
.then(function () {
// do something after prefixless is done
});
- if
options
is provided- all options must be set
- else
- if prefixless is invoked by a script that is executed with
npm run
- configuration is resolved as with CLI usage
- else the defaults are used
- if prefixless is invoked by a script that is executed with
With programmatic usage, watching is not an option (pun intended).
License
MIT