mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: source maps for Karma/Gulp
For Karma, the source mapa are inlined inside each source file.
For `build/*` output, separate `*.map` file is created.
This changes the API of `tools/transpiler/index.js`. I believe this API
is only used in `gulp-traceur.js` and `karma-traceur-preprocessor.js`.
Instead of returning the transpiled string, `compile()` returns a result
object such as:
```js
{
js: ‘transpiled code’,
sourceMap: null || {}
}
```
Closes #20
This commit is contained in:
@@ -20,6 +20,7 @@ var through2 = require('through2');
|
||||
var watch = require('gulp-watch');
|
||||
|
||||
var js2es5Options = {
|
||||
sourceMaps: true,
|
||||
annotations: true, // parse annotations
|
||||
types: true, // parse types
|
||||
script: false, // parse as a module
|
||||
@@ -36,6 +37,7 @@ var js2es5OptionsDev = merge(true, js2es5Options, {
|
||||
});
|
||||
|
||||
var js2dartOptions = {
|
||||
sourceMaps: true,
|
||||
annotations: true, // parse annotations
|
||||
types: true, // parse types
|
||||
script: false, // parse as a module
|
||||
|
||||
Reference in New Issue
Block a user