Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Optionally generate source maps. #123

Merged
merged 2 commits into from
Apr 9, 2015
Merged

Optionally generate source maps. #123

merged 2 commits into from
Apr 9, 2015

Conversation

mprobst
Copy link
Contributor

@mprobst mprobst commented Apr 7, 2015

This doesn't quite work yet - for some reason Chrome doesn't pick up the source map.

@mprobst
Copy link
Contributor Author

mprobst commented Apr 9, 2015

@alexeagle PTAL, I think this is good.

errors: string[] = [];

constructor(private failFast: boolean = false, private generateLibraryName: boolean = false) {}
constructor(opts: TranspilerOptions = {}) {
this.failFast = !!opts.failFast;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we store individual fields in the class, rather than a single TranspilerOptions reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong reason - I thought it was clearer to pull out the fields and coerce them into booleans here. I can change if you feel strongly about it.

@alexeagle
Copy link
Contributor

nice, LGTM
I guess you resolved the conflict between generating the sourcemap for dart vs. our code having sourcemap back to TS at runtime?

mprobst added 2 commits April 9, 2015 13:02
Also refactor the interface to ts2dart to pass an options object, for better
readability of the call sites.

Extract an Output class that handles result appending and source map
generation.
@mprobst
Copy link
Contributor Author

mprobst commented Apr 9, 2015

I've sent evanw/node-source-map-support#48 for the source map issue.

@mprobst mprobst changed the title Attempt to support source maps. Optionally generate source maps. Apr 9, 2015
@mprobst mprobst merged commit d971117 into master Apr 9, 2015
@mprobst mprobst deleted the source-map branch April 9, 2015 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

3 participants