-
Notifications
You must be signed in to change notification settings - Fork 12
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
Typescript to Javascript Packages #71
Comments
TsProject should allow bundles ( a single file ES6 module library/component/application ) to restrict which exports are public ( and those which can be treated as internal ). This would allow a cleaner bundle definition file for the bundle and allow internal identifiers to be minimized. |
Add bundle configuration option "package":
None: no additional bundle processing. |
This feature is now in NPM release 1.2.0-rc.7 |
Provided in TsProject 1.2. |
The main idea/convention of TsProject ( however poorly documented ) is that Typescript code be organized around only classes that are in separate files. Essentially each class is an external module ( ES6 ). TsProject then takes a set of project files ( defined in a tsconfig.json project ) and creates any number of bundles from this set of project files based on the dependencies of the input files defining the bundle. The resultant bundle in then a single ES6 module/file.
For me, carving my code base into single ES6 modules and transpiling to ES5 module formats like AMD (Web) or commonjs (Node) makes sense until browsers and http2 catch up to all the needs that ES6 requires. I really have no interest in using tools like jspm or system-builder yet.
What I would like to have TsProject do in the short term is provide named packages that encapsulate components, libraries, etc where the package is minified ( all classes and methods become internal except for the package exports ) and a proper d.ts definition file is emitted.
This really isn't far from where TsProject is at the moment. However it does lock down some conventions that need to be made.
This feature will be in TsProject 1.2.
The text was updated successfully, but these errors were encountered: