Skip to content

Instantly share code, notes, and snippets.

@hibri
Last active August 29, 2015 14:11
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 hibri/6ccd0aef805353dc8260 to your computer and use it in GitHub Desktop.
Save hibri/6ccd0aef805353dc8260 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower_concat: {
all: {
dest: 'public/javascripts/dist/_bower.js',
cssDest: 'public/stylesheets/_bower.css',
bowerOptions: {
relative: false
}
}
},
watch: {
scripts: {
files: ['**/*.js','!node_modules/**','!bower_components/**','!public/javascripts/dist/**'],
tasks: ['build'],
options: {
spawn: false
}
}
},
nodemon: {
dev: {
script: 'bin/www',
ignore: ['node_modules/**','bower_components/**','public/**']
}
},
concurrent: {
dev: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
}
},
jshint: {
all: ['Gruntfile.js', 'lib/**/*.js', 'tests/**/*.js','public/javascripts/app/**/*.js']
},
concat: {
dist: {
src: 'public/javascripts/app/**/*.js',
dest: 'public/javascripts/dist/_app.js'
}
},
bower : {
install :{
options: {
targetDir: 'bower_components'
}
}
},
karma : {
unit : {
options :{
files : ['tests/**/*.js']
}
}
}
});
grunt.loadNpmTasks('grunt-bower-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-karma');
// Default task(s).
grunt.registerTask('default', ['dev']);
grunt.registerTask('build', ['jshint','karma','concat','bower_concat']);
grunt.registerTask('dev', ['concurrent']);
//heroku tasks
grunt.registerTask('heroku:production', ['bower:install','concat', 'bower_concat']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment