Skip to content

Instantly share code, notes, and snippets.

@cubaraphael
Created December 5, 2013 00:58
Show Gist options
  • Select an option

  • Save cubaraphael/7798425 to your computer and use it in GitHub Desktop.

Select an option

Save cubaraphael/7798425 to your computer and use it in GitHub Desktop.
My Gruntfile.js
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
all: ['www/js/components/**/*.js'],
options: {
curly: true,
eqeqeq: true,
eqnull: true,
browser: true,
globals: {
jQuery: true
}
}
},
uglify: {
options: {
report: 'gzip'
},
my_target: {
files: {
'www/js/index.min.js': [
'www/js/components/index.js'
],
'www/js/organizador.min.js': [
'www/js/components/templateGenerator.js',
'www/js/components/facebook.js',
'www/js/components/organizador.js',
]
}
}
},
watch: {
scripts: {
files: 'www/js/components/**/*.js',
tasks: ['jshint', 'uglify']
}
}
});
// carrega plugin das tarefas
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
// registra tarefas
grunt.registerTask('default', ['jade', 'compass', 'jshint', 'uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment