Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding ts support #16

Merged
merged 12 commits into from
Jan 22, 2018
Merged

adding ts support #16

merged 12 commits into from
Jan 22, 2018

Conversation

tymondesigns
Copy link
Contributor

@tymondesigns tymondesigns commented Dec 13, 2017

refs #5

had a quick stab at it yesterday, although getting an error when running the cli:

image

Any thoughts? @developit

@developit
Copy link
Owner

Funky - looking into this today.

@LinusU
Copy link

LinusU commented Dec 14, 2017

Will this also put a .d.ts file in the published package? That seems like something that we should absolutely do...

@developit
Copy link
Owner

@LinusU - think it would make sense to disable the flow and buble plugins when ts is enabled? We'd just need to tell it to transpile to ES5, but I think that'd garner better output.

@LinusU
Copy link

LinusU commented Dec 19, 2017

Yeah, I think so, TS can compile with ES5 as output, and will then handle ES6/7/etc. syntax

@developit
Copy link
Owner

developit commented Dec 20, 2017

Another thought: what about enabling this all the time? rollup-plugin-typescript2 only processes *.ts files, so we could just have it there all the time and projects could mix & match if they needed. Too weird? haha

@developit developit self-requested a review December 20, 2017 20:18
@gpoitch
Copy link

gpoitch commented Dec 20, 2017

You could probably drop buble completely and have typescript transpile the .js files

@LinusU
Copy link

LinusU commented Dec 21, 2017

Too weird? haha

I like it! 🚀

@developit
Copy link
Owner

@gpoitch I think that would increase output size quite a bit though

@KatSick
Copy link

KatSick commented Jan 10, 2018

@developit is ther any updates on this ?

@developit
Copy link
Owner

Might be worth trying out Babel's typescript support if we switch to Babel.

@marvinhagemeister
Copy link
Collaborator

Babelsberg TypeScript support is limited in the sense that things like const enums is not supported. Only the TypeScript compiler has the full feature set for now.

@tymondesigns
Copy link
Contributor Author

tymondesigns commented Jan 19, 2018

Little update on this.. i've found the source of the error thanks to vs code debugger. looks like babylon is throwing:

edit: the problem comes from flow ... getting closer!

image

@tymondesigns
Copy link
Contributor Author

tymondesigns commented Jan 19, 2018

It now runs the build and outputs the compiled ts files to dist 🎉

@tymondesigns
Copy link
Contributor Author

all good now I think @developit

@tymondesigns tymondesigns changed the title [WIP] starting ts support adding ts support Jan 19, 2018
Copy link
Owner

@developit developit left a comment

Choose a reason for hiding this comment

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

AMAZING

@developit developit merged commit ffa65d0 into developit:master Jan 22, 2018
@tymondesigns tymondesigns deleted the feature/typescript branch January 22, 2018 19:43
@tymondesigns
Copy link
Contributor Author

🎉

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

Successfully merging this pull request may close these issues.

6 participants