aleris / zxing-typescript

Open-source, multi-format 1D/2D barcode image processing library ported from Java in TypeScript usable from node or browser
Apache License 2.0
80 stars 30 forks source link

Add compiled TypeScript sources to packaged publishes #8

Open odahcam opened 6 years ago

odahcam commented 6 years ago

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: https://github.com/angular/angular-cli/issues/8284#issuecomment-341417325

odahcam commented 6 years ago

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