Skip to content

Instantly share code, notes, and snippets.

@DekusDenial
Created June 28, 2013 13:55
Show Gist options
  • Save DekusDenial/5884841 to your computer and use it in GitHub Desktop.
Save DekusDenial/5884841 to your computer and use it in GitHub Desktop.
minimal gruntfile
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg : grunt.file.readJSON("package.json"),
meta : {
js : [
'js/*.js',
'lib/*.js'
],
sass : [
'sass/*.scss',
'sass/**/*.scss'
],
grunt : [
'Gruntfile.js'
]
},
bgShell : {
server : {
cmd : 'node ./server.js',
bg: true,
stdout: true,
stderr : true
}
},
watch: {
js : {
files: '<%= meta.js %>',
tasks: ['concat', 'uglify']
},
sass : {
files : '<%= meta.sass %>',
tasks : ['compass:dev']
},
grunt : {
files : '<%= meta.grunt %>',
tasks : ['watch']
}
},
compass : {
dev: {
options : {
config : 'config.rb'
}
}
},
concat : {
options : {
separactor: ';'
},
dist : {
src : '<%= meta.js %>',
dest : 'script/app.join.js'
}
},
uglify : {
dist : {
src : 'script/app.join.js',
dest : 'script/app.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-bg-shell');
grunt.registerTask('build', ['compass:dev', 'concat', 'uglify']);
grunt.registerTask('default', ['bgShell:server', 'build', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment