Last active
August 29, 2015 14:04
-
-
Save thoughtpalette/3b149bfa208b63bcfb05 to your computer and use it in GitHub Desktop.
Default Gruntfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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