Skip to content

Commit

Permalink
improves sourcemap
Browse files Browse the repository at this point in the history
* provides a default `basePath` for transpiler container
* propagates `sourceMap` value to the container for customization
  • Loading branch information
caridy committed Nov 15, 2014
1 parent 1e3f048 commit 5675acc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function CompileModules(inputTree, options) {
this.formatter = formatter;
this.output = options.output || '.';
this.description = options.description;
this.basePath = options.basePath;
this.sourceRoot = options.sourceRoot;

this._cache = {};
this._cacheIndex = 0;
Expand Down Expand Up @@ -166,7 +168,9 @@ CompileModules.prototype.compileAndCacheModules = function (modulePaths, srcDir,
// need to vist it when re-processing "foo".
var container = new Container({
formatter: this.formatter,
resolvers: this.getResolvers(cache, srcDir)
resolvers: this.getResolvers(cache, srcDir),
basePath: this.basePath || srcDir,
sourceRoot: this.sourceRoot
});

// Returns transpiler `Module` instances.
Expand Down

0 comments on commit 5675acc

Please sign in to comment.