From 72985d14b51ac37a15fe794d475ea44817f63b54 Mon Sep 17 00:00:00 2001 From: Eric Ferraiuolo Date: Mon, 28 Jul 2014 16:45:00 -0400 Subject: [PATCH] Update es6-module-transpiler to 0.6.0, source maps This now outputs source maps! --- index.js | 10 ++++------ package.json | 2 +- tests/fixtures/commonjs/expected/foo.js | 4 +++- tests/fixtures/commonjs/expected/foo/bar.js | 4 +++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 8e6ba0c..6c09a7b 100644 --- a/index.js +++ b/index.js @@ -203,10 +203,9 @@ CompileModules.prototype.compileAndCacheModules = function (modulePaths, srcDir, cacheEntry.dir = cacheDir; - // TODO: Add source map to `outputFiles`. cacheEntry.outputFiles = [ - relPath /*, - relPath + '.map'*/ + relPath, + relPath + '.map' ]; this.copyFromCache(cacheEntry, outputPath); @@ -221,10 +220,9 @@ CompileModules.prototype.compileAndCacheModules = function (modulePaths, srcDir, hash: outputHash.join(','), dir : cacheDir, - // TODO: Add source map to `outputFiles`. outputFiles: [ - outputFile /*, - outputFile + '.map'*/ + outputFile, + outputFile + '.map' ] }; diff --git a/package.json b/package.json index f75dfce..8b6df5f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "broccoli-kitchen-sink-helpers": "^0.2.4", "broccoli-writer": "^0.1.1", - "es6-module-transpiler": "^0.5.1", + "es6-module-transpiler": "^0.6.0", "mkdirp": "^0.5.0", "quick-temp": "^0.1.2", "symlink-or-copy": "^1.0.0", diff --git a/tests/fixtures/commonjs/expected/foo.js b/tests/fixtures/commonjs/expected/foo.js index 4615a85..5ad1ced 100644 --- a/tests/fixtures/commonjs/expected/foo.js +++ b/tests/fixtures/commonjs/expected/foo.js @@ -11,4 +11,6 @@ Object.seal(Object.defineProperties(exports, { })); var foo$bar$$ = require("./foo/bar"); -var baz = foo$bar$$.default; \ No newline at end of file +var baz = foo$bar$$.default; + +//# sourceMappingURL=foo.js.map \ No newline at end of file diff --git a/tests/fixtures/commonjs/expected/foo/bar.js b/tests/fixtures/commonjs/expected/foo/bar.js index 61ea7d7..fdbbe04 100644 --- a/tests/fixtures/commonjs/expected/foo/bar.js +++ b/tests/fixtures/commonjs/expected/foo/bar.js @@ -10,4 +10,6 @@ Object.seal(Object.defineProperties(exports, { } })); -var foo$bar$$default = { testing: true }; \ No newline at end of file +var foo$bar$$default = { testing: true }; + +//# sourceMappingURL=bar.js.map \ No newline at end of file