Skip to content

Instantly share code, notes, and snippets.

@DESIGNfromWITHIN
Last active August 29, 2015 14:03
Show Gist options
  • Save DESIGNfromWITHIN/03272ff80648ddcc5e51 to your computer and use it in GitHub Desktop.
Save DESIGNfromWITHIN/03272ff80648ddcc5e51 to your computer and use it in GitHub Desktop.
MODX Grunt & Compass build file
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
concat: {
options: {
separator: ';',
},
dist: {
src: [
'bower_components/jquery/dist/jquery.js',
'bower_components/imagesloaded/imagesloaded.pkgd.js',
'bower_components/masonry/dist/masonry.pkgd.js',
'js/plugins/jRespond.js',
'js/plugins/jquery.sticky.js',
'js/plugins/jquery.bxslider.js',
'js/plugins/doubletaptogo.js',
'js/plugins/foundation.reveal.js',
'bower_components/foundation/js/foundation.js',
'js/app.js'
],
dest: 'js/production.js'
}
},
uglify: {
my_target: {
files: {
'js/production.min.js': ['js/production.js']
}
}
},
watch: {
files: ['js/**/*.js', 'bower_components/**/*.js', 'scss/**/*.scss'],
tasks: ['concat', 'uglify', 'compass'],
//tasks: ['compass', 'concat'],
},
compass: { // Task
//dist: {
//options: {
//sassDir: 'scss',
//cssDir: 'stylesheets',
//environment: 'production'
//}
//},
dev: { // Another target
options: {
sassDir: 'scss',
cssDir: 'dev',
environment: 'development',
outputStyle: 'expanded'
}
}
}
});
// Load concat task
grunt.loadNpmTasks('grunt-contrib-concat');
// Load watch task
grunt.loadNpmTasks('grunt-contrib-watch');
// Load compass task
grunt.loadNpmTasks('grunt-contrib-compass');
// Load uglify task
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task.
grunt.registerTask('default', ['concat', 'uglify', 'compass']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment