Created
October 17, 2016 09:32
-
-
Save hiroaki-yamamoto/daf3328308f121ee1f3e1a0950511221 to your computer and use it in GitHub Desktop.
I wanna do somethig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g.task "third_party", -> | |
prefix = "app/home/static/third_party" | |
files = [ | |
"#{prefix}/angular/angular.js" | |
"#{prefix}/angular-animate/angular-animate.js" | |
"#{prefix}/angular-aria/angular-aria.js" | |
"#{prefix}/angular-messages/angular-messages.js" | |
"#{prefix}/angular-resource/angular-resource.js" | |
"#{prefix}/angular-material/angular-material.js" | |
] | |
if not toolbox.isProduction or process.env.node_mode is "init" | |
files.splice 2, 0, "#{prefix}/angular-mocks/angular-mocks.js" | |
files.push "#{prefix}/angular-material/angular-material-mocks.js" | |
pipe = g.src(files).pipe( | |
plumber "errorHandler": notify.onError '<%= error.message %>' | |
) | |
if not toolbox.isProduction or process.env.node_mode is "init" | |
pipe = pipe.pipe(sourcemaps.init()) | |
pipe = pipe.pipe concat("third_party.js") | |
if toolbox.isProduction | |
pipe = pipe.pipe(uglify()) | |
if not toolbox.isProduction or process.env.node_mode is "init" | |
pipe = pipe.pipe(sourcemaps.write()) | |
pipe.pipe g.dest "app/home/static" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this code has too much
if
...