Skip to content

Add compiled TypeScript sources to packaged publishes #8

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

Open
odahcam opened this issue Dec 13, 2017 · 1 comment
Open

Add compiled TypeScript sources to packaged publishes #8

odahcam opened this issue Dec 13, 2017 · 1 comment

Comments

@odahcam
Copy link
Collaborator

odahcam commented Dec 13, 2017

Why? Other people can explain better:

You have TS files in your node_modules. This really goes against how libraries should be packaged:
libraries should never ship their source .ts files.

The reason for this rule is that the TypeScript version your app isn't necessarily the same as the TS version your library uses. Different versions of TS can produce different output, and give different errors for the same input. They don't even support the same language features. So packaging libraries with TS sources will always break someone's project.

Source: angular/angular-cli#8284 (comment)

@odahcam
Copy link
Collaborator Author

odahcam commented Dec 19, 2017

I've made one build that satisfies that practice in my fork.

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

No branches or pull requests

1 participant