1.0.1 • Published 8 years ago
grunt-style-extract v1.0.1
What is grunt-style-extract?
Grunt-style-extract is a Grunt version of style-extract, which is used for extracting only specific CSS properties and their selectors from CSS files.
Install
npm install grunt-style-extract
Options
- properties: an array of CSS properties, that will be extracted
Usage
grunt.initConfig({
...
styleExtract: {
colors: {
options: {
'properties': ['color', 'background-color']
},
files: {
'dist/style.css': 'lib/style.css'
}
},
},
...
});
Before
/* Foo */
.foo {
background-color: #fff;
color: #000;
display: block;
font-size: 12px;
}
/* Bar */
.bar {
text-align: center;
}
After
.foo {
background-color: #fff;
color: #000;
}
Grunt version
The Gulp version can be found at grunt-style-extract.
Node version
The Node version can be found at style-extract.