Created
November 12, 2016 22:48
-
-
Save tadatuta/5bae68393deb5f5d67f265476ec9eef8 to your computer and use it in GitHub Desktop.
Run enb-closure-compiler-js if YENV=production
This file contains 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
diff --git a/.enb/make.js b/.enb/make.js | |
index bf95ff2..2d49bfc 100644 | |
--- a/.enb/make.js | |
+++ b/.enb/make.js | |
@@ -5,6 +5,7 @@ var techs = { | |
// optimization | |
borschik: require('enb-borschik/techs/borschik'), | |
+ closure: require('enb-closure-compiler-js/techs/closure-compiler'), | |
// css | |
stylus: require('enb-stylus/techs/stylus'), | |
@@ -93,10 +94,12 @@ module.exports = function(config) { | |
}], | |
// borschik | |
- [techs.borschik, { source: '?.js', target: '?.min.js', minify: isProd }], | |
+ [techs.borschik, { source: '?.js', target: (isProd ? '?.borschik.js' : '?.min.js'), minify: false }], | |
[techs.borschik, { source: '?.css', target: '?.min.css', minify: isProd }] | |
]); | |
+ isProd && nodeConfig.addTech([techs.closure, { source: '?.borschik.js', target: '?.min.js' }]); | |
+ | |
nodeConfig.addTargets([/* '?.bemtree.js', */ '?.html', '?.min.css', '?.min.js']); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment