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

Include the src in NPM #2222

Closed
eXon opened this issue May 31, 2015 · 5 comments
Closed

Include the src in NPM #2222

eXon opened this issue May 31, 2015 · 5 comments

Comments

@eXon
Copy link
Contributor

eXon commented May 31, 2015

I am working on the YouTube tech for VJS 5 and I though hey! let's recode all this using ES6 and use the awesome stuff they already made. Then I looked at the NPM folder and realized nothing is there except the dist folder.

Don't you think it will make sense to include the src folder so that people developing with VJS can use all the stuff that already exists. I could extend from the Tech class directly and use all the cross-browser stuff that already work fine and been tested.

If you have a better way, let me know because I think it is important.

@gkatsev
Copy link
Member

gkatsev commented May 31, 2015

If we do include the src in the npm package, which I'm all for, users shouldn't be using it directly, for the most part. Files could be moved, changed, renamed, removed between versions.
Some npm packages like global have a file API require('global/document') and require('global/window') which we would want to adopt if we were to go this route. Any changes to these files would then require a major version update.

@eXon
Copy link
Contributor Author

eXon commented May 31, 2015

That's a valid point. However, if I use vjs.element instead of import element from 'video.js/src/js/element';, nothing tells me that the API will not change. The only problem I can see is having duplicate code on both files but I don't think it is a big deal.

@gkatsev
Copy link
Member

gkatsev commented Jun 1, 2015

But if vjs.element is available, that means it's part of the external API. This does have some meaning in terms of stability. If you're using something internal, you have no such guarantees.
As I mentioned, I'd be ok with adding a tech.js file into the repo at the main level that basically just imported and exported whatever the internal path is. Then, you could do import element from 'video.js/element' which would count as part of the API.

@gkatsev
Copy link
Member

gkatsev commented Nov 17, 2015

Yes, I think we should publish everything to npm, though, keep things nice and tight and limited for the zip release on github and what we push to the cdn.

@gkatsev
Copy link
Member

gkatsev commented Jul 25, 2016

#3445 will fix this. Going to close this in the meantime.

@gkatsev gkatsev closed this as completed Jul 25, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants