Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
document lowResSourceMaps option
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jan 29, 2015
1 parent 7ddaed7 commit 91437f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ As well as an `options.config` parameter, it is also possible to specify minific
builder.build('myModule', 'outfile.js', { minify: true, sourceMaps: true, config: cfg });
```

Compile time with source maps can also be improved with the `lowResSourceMaps` option:

This comment has been minimized.

Copy link
@crisptrutski

crisptrutski Jan 29, 2015

Contributor

Should mention somewhere that this option is the default for bundling (maybe a "help my sourcemaps aren't right" note). Same goes for documenting it in cli once this builder lands in jspm.

This comment has been minimized.

Copy link
@guybedford

guybedford Jan 29, 2015

Author Member

It's only the default in jspm I think? jspm docs need lots of love...

This comment has been minimized.

Copy link
@crisptrutski

crisptrutski Jan 29, 2015

Contributor

You're right, I'm too tired. Got confused by the link to jspm diff in your "review builder" mail 👅

This comment has been minimized.

Copy link
@guybedford

guybedford Jan 29, 2015

Author Member

All good points... thanks for taking the time out this evening.


```javascript
builder.build('myModule', 'outfile.js', { sourceMaps: true, lowResSourceMaps: true });
```

### Ignore Resources

If loading resources that shouldn't even be traced as part of the build (say an external import), these
Expand Down
2 changes: 1 addition & 1 deletion compilers/amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ exports.compile = function(load, opts, loader) {
var options = {};
if (opts.sourceMaps)
options.sourceMaps = 'memory';
if (opts.lowResolutionSourceMaps)
if (opts.lowResSourceMaps)
options.lowResolutionSourceMap = true;

if (load.metadata.sourceMap)
Expand Down
2 changes: 1 addition & 1 deletion compilers/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ exports.compile = function(load, opts, loader) {
var options = { script: true };
if (opts.sourceMaps)
options.sourceMaps = 'memory';
if (opts.lowResolutionSourceMaps)
if (opts.lowResSourceMaps)
options.lowResolutionSourceMap = true;

if (load.metadata.sourceMap)
Expand Down
2 changes: 1 addition & 1 deletion compilers/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ exports.compile = function(load, opts, loader) {

if (opts.sourceMaps)
options.sourceMaps = 'memory';
if (opts.lowResolutionSourceMaps)
if (opts.lowResSourceMaps)
options.lowResolutionSourceMap = true;

if (load.metadata.sourceMap)
Expand Down
2 changes: 1 addition & 1 deletion compilers/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exports.compile = function(load, opts, loader) {

if (opts.sourceMaps)
options.sourceMaps = 'memory';
if (opts.lowResolutionSourceMaps)
if (opts.lowResSourceMaps)
options.lowResolutionSourceMap = true;

if (load.metadata.sourceMap)
Expand Down

0 comments on commit 91437f7

Please sign in to comment.