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:
Vojta Jina
2014-10-30 18:52:32 +01:00
parent 18cdab7450
commit 1dc5a22f07
6 changed files with 56 additions and 6 deletions

View File

@ -57,6 +57,7 @@ module.exports = function(config) {
traceurPreprocessor: {
options: {
outputLanguage: 'dart',
sourceMaps: true,
script: false,
modules: 'register',
types: true,