v8-cpu/Gruntfile.js

70 lines
1.8 KiB
JavaScript

module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['src/app.js', 'src/**/*.js'],
dest: 'assets/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'assets/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js'],
options: {
// options here to override JSHint defaults
trailing: true,
globals: {
browser: true,
console: true
}
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'concat']
},
php: {
dist: {
options: {
port: 8082,
hostname: '0.0.0.0',
base: '.',
keepalive: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
grunt.registerTask('http', ['php']);
};
/*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*/