Skip to content

Instantly share code, notes, and snippets.

@thoughtpalette
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thoughtpalette/3b149bfa208b63bcfb05 to your computer and use it in GitHub Desktop.
Save thoughtpalette/3b149bfa208b63bcfb05 to your computer and use it in GitHub Desktop.
Default Gruntfile
module.exports = function( grunt )
{
// Project configuration
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
watch:
{
livereload: {
options: {livereload: true},
files: ['source/**/*']
},
styles:
{
files: [
"source/styles/library/*",
"source/styles/project/*"
],
tasks: [ "less:dev", "concat:baseStyles" ]
},
scripts:
{
files: [
"source/scripts/project/*"
],
tasks: [ "uglify", "concat:scripts"]
},
},
less:
{
dev:
{
files: {
"build/project.css": "source/styles/project/*.less"
}
}
},
uglify: {
project: {
files: {
'build/project.js': "source/scripts/project/*"
}
}
},
concat:
{
scripts:
{
src: [
"source/scripts/project/*"
],
dest: "build/project.js"
},
jquery:
{
src: [
"source/scripts/libraries/jquery-1.11.0.min.js"
],
dest: "build/jquery.js"
},
baseStyles:
{
src: [
"source/styles/library/reset.css"
],
dest: "build/base.css"
}
}
} );
grunt.loadNpmTasks( "grunt-contrib-watch" );
grunt.loadNpmTasks( "grunt-contrib-less" );
grunt.loadNpmTasks( "grunt-contrib-uglify" );
grunt.loadNpmTasks( "grunt-contrib-concat" );
// Default Tasks
grunt.registerTask( "default", [ "concat:scripts", "concat:jquery", "concat:baseStyles", "less:dev" ] );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment