Fix Gruntfile to actually uglify production code

This commit is contained in:
Andrew Miner
2016-04-05 22:42:13 -07:00
parent d47f174848
commit 76ae358878
+5 -4
View File
@@ -53,7 +53,7 @@ module.exports = (grunt)->
files: [ files: [
{expand: true, cwd:'./build/static', src:'**/*.css', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.css', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.html', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.html', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.js', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.ugly.js', dest:'./dist/', ext: '.js'}
{expand: true, cwd:'./build/static', src:'**/*.json', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.json', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.ttf', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.ttf', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.txt', dest:'./dist/'} {expand: true, cwd:'./build/static', src:'**/*.txt', dest:'./dist/'}
@@ -75,7 +75,7 @@ module.exports = (grunt)->
] ]
build_to_dist: build_to_dist:
files: [ files: [
{expand:true, cwd:'./build/static/', src:['**/*', '!**/*.map'], dest:'./dist'} {expand:true, cwd:'./build/static/', src:['**/*', '!**/*.map', '!**/*.js'], dest:'./dist'}
] ]
common_source: common_source:
files: [ files: [
@@ -152,7 +152,8 @@ module.exports = (grunt)->
expand: true expand: true
cwd: './build/static' cwd: './build/static'
src: '**/*.js' src: '**/*.js'
dest: './dist' dest: './build/static'
ext: '.ugly.js'
] ]
watch: watch:
@@ -202,7 +203,7 @@ module.exports = (grunt)->
['script:deploy:staging'] ['script:deploy:staging']
grunt.registerTask 'dist', 'build the project to be run from Amazon S3', grunt.registerTask 'dist', 'build the project to be run from Amazon S3',
['build', 'uglify', 'copy:build_to_dist', 'compress'] ['build', 'copy:build_to_dist', 'uglify', 'compress']
grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code', grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code',
['clean', 'coffee'] ['clean', 'coffee']