Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

supporting inline sourcemaps #7

Merged
merged 5 commits into from
Mar 8, 2015
Merged

supporting inline sourcemaps #7

merged 5 commits into from
Mar 8, 2015

Conversation

basarat
Copy link
Collaborator

@basarat basarat commented Mar 8, 2015

closes #6

  • Passing tests
  • Add inline-sourcemaps

👍 on your code quality. Really simple. Zero dependencies. Really easy to reuse. Comes with tests ❤️

Added a tsconfig.json to make it easier to work on this with any editor.
Will be bringing in stuff from https://github.com/thlorenz/convert-source-map
Will leave a comment once this code is ready for merge

@basarat
Copy link
Collaborator Author

basarat commented Mar 8, 2015

Ready to be merged. You can see sourcemaps work in chrome over here : https://github.com/basarat/sourceMapTest

@basarat
Copy link
Collaborator Author

basarat commented Mar 8, 2015

image

and

image

@teppeis
Copy link
Owner

teppeis commented Mar 8, 2015

Really awesome!

"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
Copy link
Owner

Choose a reason for hiding this comment

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

Make "declaration": true and update index.d.ts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -77,22 +81,56 @@ var tss;
return path.dirname(require.resolve('typescript'));
};
TypeScriptSimple.prototype.getDefaultLibFilename = function (options) {
if (options.target === 2 /* ES6 */) {
if (options.target === ts.ScriptTarget.ES6) {
Copy link
Owner

Choose a reason for hiding this comment

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

@basarat I think this is better, but my tsc (TypeScript 1.4.2 on Mac) compiles ts.ScriptTarget.ES6 to 2 without asking.
What your compiler option keeps enum expressions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What your compiler option keeps enum expressions?

Its a bug in the language service. Constant enums should always be inlined.

I use atom-typescript and that build using the language service (instead of the cli). : https://atom.io/packages/atom-typescript

Copy link
Owner

Choose a reason for hiding this comment

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

I got it. thanks.

teppeis added a commit that referenced this pull request Mar 8, 2015
supporting inline sourcemaps
@teppeis teppeis merged commit cebec21 into teppeis:master Mar 8, 2015
@teppeis
Copy link
Owner

teppeis commented Mar 8, 2015

LGTM! thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting work on supporting inline sourcemaps
2 participants