You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
module.exports = function (grunt) {
|
|
grunt.initConfig({
|
|
copy: {
|
|
main: {
|
|
files: [
|
|
{expand: false, src: ['node_modules/jquery/dist/jquery.min.js'], dest: 'public/js/jquery.min.js', filter: 'isFile'},
|
|
{expand: false, src: ['node_modules/phaser/dist/phaser.min.js'], dest: 'public/js/phaser.min.js', filter: 'isFile'},
|
|
],
|
|
},
|
|
},
|
|
|
|
uglify: {
|
|
my_target: {
|
|
files: {
|
|
'public/js//level1.min.js': ['src/js/level1/*.js'],
|
|
'public/js//level2.min.js': ['src/js/level2/*.js'],
|
|
'public/js//level3.min.js': ['src/js/level3/*.js']
|
|
}
|
|
}
|
|
},
|
|
|
|
cssmin: {
|
|
options: {
|
|
mergeIntoShorthands: false,
|
|
roundingPrecision: -1
|
|
},
|
|
target: {
|
|
files: {
|
|
'public/css//app.min.css': ['src/css/*.css']
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
grunt.loadNpmTasks('grunt-contrib-uglify-es');
|
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
|
|
grunt.registerTask('cp', ['copy']);
|
|
grunt.registerTask('ugl', ['uglify', 'cssmin']);
|
|
grunt.registerTask('default', ['cp', 'ugl']);
|
|
}
|