-
Notifications
You must be signed in to change notification settings - Fork 618
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
Separate build/ folder and include both ts source files and compiled js files in the release. #1955
Comments
microsoft/TypeScript#12358 is relevant -- it's pretty confusing though. I still don't know what's the right solution. |
|
After research and some experiment, I think this is the way to go. |
I explained the benefits of this approach from my experiment with CompassQL in here: https://github.com/vega/compassql/releases/tag/v0.9.2 cc: @weswigham - I wonder if you have any objection against this since this will override some of your previous changes. |
Keeping the Just don't include the In short, it normally causes more problems for library consumers than the library developer ones it solves. |
I don't think this proposal disagrees with the fact that users should import the As mentioned in https://github.com/vega/compassql/releases/tag/v0.9.2, we will say that users should do targeted import from the output JS in The original approach you did in an earlier PR (just leave js files in I think we should still include TS files so users can debug VL related stuff with proper source map linked to the original TS code in dependent projects. Source map is becoming more and more important as TS include more complex syntax like the spread operator and object decomposition-- the compiled JS code now can diverge from the original TS files a lot. |
IMO, there is no really good fix for the So long as the "types" and "main" entry points in the package.json still point at the built .d.ts and .js files, I don't care too much about what gets done with the .ts - leaving it around is just a likely footgun for someone who doesn't know any better. Make the |
@weswigham Thanks so much for your input. I think what I did in CompassQL doesn't violate any of the major concerns you have and works fine when I npm link compassql in a dependent project, so I think I'll apply the same approach here then. :) |
Currently, we only include js files (and exclude ts files) in the release due to changes in #1649.
However, I think we should instead include both to provide flexibility for both downstream ts and js projects.
vega-lite.js|min.js
and all compiled*.js
and*.d.ts
) tobuild/
The text was updated successfully, but these errors were encountered: