Created
May 16, 2015 16:24
-
-
Save memolog/99e93f473060a77618e8 to your computer and use it in GitHub Desktop.
ad hoc fix for es5build.js
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/tools/build/es5build.js b/tools/build/es5build.js | |
index b16f9d9..25b5ae6 100755 | |
--- a/tools/build/es5build.js | |
+++ b/tools/build/es5build.js | |
@@ -56,7 +56,10 @@ function run(config) { | |
.pipe(sourcemaps.init()) | |
.pipe(through2.obj(function(file, encoding, done) { | |
var self = this; | |
- fs.readFile(file.path.replace('.js', '.map'), function(error, buffer) { | |
+ var filePath = file.path.replace('.js', '.map'); | |
+ var exists = fs.existsSync(filePath); | |
+ filePath = exists ? filePath : file.path.replace('.js', '.es6.map'); | |
+ fs.readFile(filePath, function(error, buffer) { | |
if (error) { | |
return done(error); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment