Skip to content

Instantly share code, notes, and snippets.

@klickreflex
Created June 4, 2014 16:00
Show Gist options
  • Save klickreflex/b993a8606d647e13e078 to your computer and use it in GitHub Desktop.
Save klickreflex/b993a8606d647e13e078 to your computer and use it in GitHub Desktop.
Bolt gruntfile
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// 2. Configuration for concatinating files goes here.
concat: {
dist: {
src: [
'theme/tierpsychologie/bower_components/gumby/js/libs/gumby.js', // All JS in the libs folder
'theme/tierpsychologie/bower_components/gumby/js/libs/gumby.init.js',
'app/view/js/jquery.magnific-popup.min.js',
'theme/tierpsychologie/js/jquery.meanmenu.js',
'theme/tierpsychologie/js/app.js',
'theme/tierpsychologie/bower_components/gumby/js/plugins.js',
'theme/tierpsychologie/bower_components/gumby/js/main.js'
],
dest: 'theme/tierpsychologie/js/production.js',
}
},
uglify: {
build: {
src: 'theme/tierpsychologie/js/production.js',
dest: 'theme/tierpsychologie/js/production.min.js'
}
},
watch: {
scripts: {
files: ['theme/tierpsychologie/js/*.js'],
tasks: ['concat', 'uglify'],
options: {
spawn: false,
},
}
}
});
// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['concat', 'uglify', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment