-
-
Save shapeshifta78/3248306 to your computer and use it in GitHub Desktop.
Grunt for a CSS/JS WebApp
This file contains 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
/*global module:false*/ | |
module.exports = function(grunt) { | |
var CSS_DIR = 'src/css/'; | |
var JS_DIR = 'src/js/'; | |
var BUILD_DIR = '../build/'; | |
// Project configuration. | |
grunt.initConfig({ | |
lint: { | |
files: [JS_DIR + 'app/**/*.js'] | |
}, | |
concat: { | |
css: { | |
src: [CSS_DIR + 'libs/*.css', CSS_DIR + 'app/*.css'], | |
dest: BUILD_DIR + 'css/editor.css' | |
}, | |
js: { | |
src: [JS_DIR + 'libs/bootstrap.js', JS_DIR + 'libs/closure-all.js', JS_DIR + 'app/*.js'], | |
dest: BUILD_DIR + 'js/editor.js' | |
}, | |
}, | |
min: { | |
js: { | |
src: '<config:concat.js.dest>', | |
dest: BUILD_DIR + 'js/editor-min.js' | |
} | |
}, | |
cssmin: { | |
css: { | |
src: '<config:concat.css.dest>', | |
dest: BUILD_DIR + 'css/editor-min.css' | |
} | |
}, | |
watch: { | |
files: '<config:lint.files>', | |
tasks: 'lint' | |
}, | |
jshint: { | |
options: { | |
curly: true, | |
eqeqeq: true, | |
immed: true, | |
latedef: true, | |
newcap: true, | |
noarg: true, | |
sub: true, | |
undef: true, | |
boss: true, | |
eqnull: true, | |
browser: true | |
}, | |
globals: {'jQuery': true} | |
}, | |
uglify: {} | |
}); | |
grunt.loadNpmTasks('grunt-css'); | |
// Default task. | |
grunt.registerTask('default', 'concat min cssmin'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment