module.exports = function( grunt ) { 'use strict'; grunt.initConfig({ // Setting folder templates. dirs: { css: 'scss' }, // Compile all .scss files. sass: { compile: { options: { sourcemap: 'none', loadPath: require( 'node-bourbon' ).includePaths }, files: [{ expand: true, cwd: '<%= dirs.css %>/', src: ['*.scss'], dest: './', ext: '.css' }] } }, // Minify all .css files. cssmin: { minify: { expand: true, cwd: './', src: [ '*.css', '!*.min.css' ], dest: './', ext: '.min.css' } }, // Watch changes for assets. watch: { css: { files: ['<%= dirs.css %>/*.scss'], tasks: ['sass', 'cssmin'] } } }); // Load NPM tasks to be used here grunt.loadNpmTasks( 'grunt-contrib-sass' ); grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); // Register tasks grunt.registerTask( 'default', [ 'css' ]); grunt.registerTask( 'css', [ 'sass', 'cssmin' ]); };