Use this file when starting a new project.
To use it with other projects excluding foundation, remove the line that says the bower_components section.
Get the list of the Node Modules from the Foundation-SASS-Testing Folder
/*jslint node: true */ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options: { | |
includePaths: ['bower_components/foundation/scss'], | |
outputStyle: 'expanded', | |
sourcemap: 'none' | |
}, | |
files: { | |
'css/app.css': 'scss/app.scss' | |
} | |
} | |
}, //sass | |
compass: { | |
dev: { | |
options: { | |
config: 'config.rb' | |
} | |
} // dev | |
}, //compass | |
watch: { | |
options: { | |
livereload: true, | |
dateFormat: function(time) { | |
grunt.log.writeln('The watch task finished in ' + time + 'ms at ' + (new Date()).toString()); | |
grunt.log.writeln('Waiting for more changes...'); | |
} //date format function | |
}, //options | |
scripts: { | |
files: ['*.js', 'js/*.js'] | |
}, // scripts | |
//Live Reload of SASS | |
sass: { | |
files: 'scss/**/*.scss', | |
tasks: ['sass'] | |
}, //sass | |
css: { | |
files: ['scss/*.scss'], | |
tasks: ['compass'] | |
}, | |
html: { | |
files: ['*.html'] | |
} | |
}, //watch | |
postcss: { | |
options: { | |
processors: [ | |
require('autoprefixer-core')({ | |
browsers: 'last 2 versions' | |
}) | |
] | |
} | |
}, //post css | |
jshint: { | |
options: { | |
reporter: require('jshint-stylish') | |
}, | |
target: ['Gruntfile.js', 'js/*.js'] | |
} //jshint | |
}); | |
grunt.loadNpmTasks('grunt-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-postcss'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-autoprefixer'); | |
/** Default Task - Can be changed eg when working betwwen javascript and sass*/ | |
grunt.registerTask('build', ['jshint']); | |
grunt.registerTask('default', ['build', 'watch', 'compass', 'jshint', 'postcss', 'sass', 'autoprefixer']); | |
} |