Commit 1a696e9c authored by Grzegorz Pietrusza's avatar Grzegorz Pietrusza

add uglify

parent d22dee47
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
cssmin: { cssmin: {
task: { task: {
src: ['./service/src/main/resources/assets/statics/css/*'], src: ['./service/src/main/resources/assets/statics/css/*'],
dest: './front_build/assets/statics/css/main.css.min' dest: './front_build/assets/statics/css/main.css.min'
}, },
options: { options: {
'banner': null, 'banner': null,
'keepSpecialComments': '*', 'keepSpecialComments': '*',
'report': 'min' 'report': 'min'
} }
} },
}); //todo: add jshint, clean and others
uglify: {
task: {
src: ['./service/src/main/resources/assets/statics/js/*.js',
'./service/src/main/resources/assets/statics/js/controllers/*'],
dest: './front_build/assets/statics/js/app.js.min'
},
options: {
'mangle': {},
'compress': {},
'beautify': false,
'expression': false,
'report': 'min',
'sourceMap': false,
'sourceMapName': undefined,
'sourceMapIn': undefined,
'sourceMapIncludeSources': false,
'enclose': undefined,
'wrap': undefined,
'exportAll': false,
'preserveComments': undefined,
'banner': '',
'footer': ''
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-cssmin');
// grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['cssmin']); grunt.registerTask('default', ['cssmin', 'uglify']);
// grunt.registerTask('default', ['cssmin', 'jshint', 'uglify']);
}; };
\ No newline at end of file
{ {
"name": "CTF", "name": "MyApp",
"title": "CTF", "title": "My App",
"version": "0.0.1", "version": "0.0.1",
"devDependencies": { "devDependencies": {
"grunt": "0.4.5", "grunt": "0.4.5",
"grunt-contrib-cssmin": "*" "grunt-contrib-cssmin": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-uglify": "*"
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment