Skip to content

Instantly share code, notes, and snippets.

@vasiliy0s
Forked from edwardhotchkiss/Gruntfile.js
Created June 1, 2014 08:55
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 vasiliy0s/2708504312f9d280e087 to your computer and use it in GitHub Desktop.
Save vasiliy0s/2708504312f9d280e087 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
},
dist: {
src: [
'app_src/*.js',
'app_src/**/*.js',
],
dest: 'public/app/app.js',
}
},
jshint: {
options: {
browser: true
},
files: {
src: [
'Gruntfile.js',
'app_src/**/*.js'
]
}
},
uglify: {
// options: {
// banner: '// <%= pkg.name %> v<%= pkg.version %>\n'
// },
build: {
src: 'public/app/app.js',
dest: 'public/app/app.min.js'
}
},
watch: {
scripts: {
files: [
'Gruntfile.js',
'app_src/**/*.js'
],
tasks: ['jshint']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('build', ['jshint','concat','uglify']);
grunt.registerTask('default', ['jshint','watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment