Skip to content

Commit

Permalink
add complete example for grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
SassNinja committed May 30, 2018
1 parent 5b9fc6c commit 7ed5628
Show file tree
Hide file tree
Showing 5 changed files with 1,066 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/grunt/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

const path = require('path');
const extractMediaQuery = require('postcss-extract-media-query');
const extractMediaQueryConfig = require('./postcss.config').plugins['postcss-extract-media-query'];

module.exports = function(grunt) {

grunt.initConfig({
clean: [path.join(__dirname, 'dist/*')],
postcss: {
options: {
processors: [extractMediaQuery(extractMediaQueryConfig)]
},
dist: {
src: path.join(__dirname, 'src/example.css'),
dest: path.join(__dirname, 'dist/example.css')
}
}
});

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-postcss');

grunt.registerTask('default', ['clean', 'postcss']);
};
Loading

0 comments on commit 7ed5628

Please sign in to comment.