Gruntfile.js 1.11 KB
module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

/**
 * 1 :: Process SASS (SCSS) files and compile their CSS version.
 */
    sass: {
      options: {
        // app.scss loads components from foundation.
        // Without this include, grunt would not know where to get them from.
        includePaths: ['bower_components/foundation/scss']
      },
      dist: {
        options: {
          // We will minify our final combined CSS file anyway.
          outputStyle: 'normal'
        },
        files: {
          'css/app.css': 'scss/app.scss',
        }
      }
    },


/**
 * X :: Watch files for changes and act on them (recompile etc...).
 */
    watch: {
      options: {
        livereload: true,
      },

      grunt: {
        files: ['Gruntfile.js']
      },

      css: {
        files: ['scss/**/*.scss', 'css/libs/*.css'],
        tasks: ['sass', ]
      },
    }

  });

  // Load necessairy grunt tasks based on npm modules.
  require("load-grunt-tasks")(grunt);

  grunt.registerTask('build', ['sass']);
  grunt.registerTask('default', ['build','watch']);
}