Skip to content

Instantly share code, notes, and snippets.

@andersonaguiar
Created June 13, 2013 17:06
Show Gist options
  • Save andersonaguiar/5775438 to your computer and use it in GitHub Desktop.
Save andersonaguiar/5775438 to your computer and use it in GitHub Desktop.
Gruntfile.js
module.exports = function( grunt ) {
grunt.initConfig({
uglify : {
options : {
mangle : false
},
my_target : {
files : {
'assets/js/main.js' : [ 'assets/_js/scripts.js' ]
}
}
}, // uglify
compass: { // Task
dist: { // Target
options: { // Target options
sassDir: '_sass',
cssDir: 'css',
config: 'config/config.rb',
environment: 'production'
}
},
dev: { // Another target
options: {
sassDir: '_sass',
cssDir: 'css'
}
}
}
watch : {
dist : {
files : [
'assets/_js/**/*',
'assets/_sass/**/*'
],
tasks : [ 'uglify', 'compass' ]
}
} // watch
});
// Plugins do Grunt
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks('grunt-contrib-compass');
// Tarefas que serão executadas
grunt.registerTask( 'default', [ 'uglify', 'sass', 'compass' ] );
// Tarefa para Watch
grunt.registerTask( 'w', [ 'watch' ] );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment