grunt-style-extract

1.0.1 • Public • Published

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.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i grunt-style-extract

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • anpsthemes