Skip to content

Instantly share code, notes, and snippets.

@memolog
Created May 16, 2015 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save memolog/99e93f473060a77618e8 to your computer and use it in GitHub Desktop.
Save memolog/99e93f473060a77618e8 to your computer and use it in GitHub Desktop.
ad hoc fix for es5build.js
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