Skip to content

Commit

Permalink
Merge pull request #601 from dannon/grunt_develop_mode
Browse files Browse the repository at this point in the history
Grunt develop mode
  • Loading branch information
carlfeberhard committed Aug 17, 2015
2 parents ed54c34 + 2666499 commit c0119de
Show file tree
Hide file tree
Showing 53 changed files with 77 additions and 65 deletions.
36 changes: 24 additions & 12 deletions client/grunt-tasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,25 @@ module.exports = function( grunt ){
src : '**/*.js',
dest : paths.dist
}],
options : {
sourceMap : true,
sourceMapName : function( path ){
// rewrite name to have all source maps in 'static/maps'
return path.replace( paths.dist, paths.maps ) + '.map';
}
}
});

if (grunt.option('develop')){
grunt.config( 'uglify.options', {
beautify : true,
compress : {
drop_debugger : false
}
});
} else {
grunt.config( 'uglify.target.options', {
sourceMap : true,
sourceMapName : function( path ){
// rewrite name to have all source maps in 'static/maps'
return path.replace( paths.dist, paths.maps ) + '.map';
}
},
options : {
});
grunt.config( 'uglify.options', {
mangle : {
screw_ie8 : true
},
Expand All @@ -45,10 +55,11 @@ module.exports = function( grunt ){
if_return : true,
join_vars : true,
cascade : true,
// drop_console : true
drop_console : true
}
}
});
});
}


// -------------------------------------------------------------------------- decompress for easier debugging
grunt.registerTask( 'decompress', function(){
Expand All @@ -73,6 +84,7 @@ module.exports = function( grunt ){
}
});


// outer scope variable for the event handler and onChange fn - begin with empty hash
var changedFiles = Object.create(null);

Expand Down Expand Up @@ -101,4 +113,4 @@ module.exports = function( grunt ){
// --------------------------------------------------------------------------
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
};
};
2 changes: 1 addition & 1 deletion static/maps/galaxy.interactive_environments.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/maps/libs/jquery/jqtouch.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/maps/libs/raven.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/maps/libs/toastr.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c0119de

Please sign in to comment.