-
Notifications
You must be signed in to change notification settings - Fork 29
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
Publish in npm #12
Comments
Thanks for your interest in the project/code. I hope that you will find it useful. I've never used npm, and only have a rough understanding it's purpose and ecosystem. What does publishing on npm require? How does it make things easier to install? Would it a be a bit redundant to maintain both a GitHub and npm presence? What does "install" really even mean for a project like mine, as it is not really a library? Note: my code could probably also be better encapsulated. I'm not sure if I'm following best practices in a lot of things. Also, my code is all done using an out-of-date version of JS. Perhaps, I should modernize at some point, but that's a whole other task. |
Just adding a I can make a fork with this change for you to take a look and decide if it's something you'd like to have.
You can then do
I don't think so? Github has your repository and your code, and npm has your "installable" package. In fact, the vast majority of npm packages have their code in github.
I know what you mean here, but I still think this classifies as a library, at least the js part (not the
which looks pretty much like a library to me. Of course, you have to make sure that you include the CSS, but that's a reasonable thing to ask to the user. |
Thanks for the information. I think it's a good idea to publish on npm.
Yes, that would be great. I really appreciate the help. |
I just made a fork with this commit adding a This doesn't include the UMD part, but that can be added later and this already lets you use it in a node environment like this:
|
@fvictorio, thank you for taking care of publishing in NPM. By the way, I just noticed that I have some places where I still mistakenly say that the code is AGPL, when I have now decided to relicense it under MIT. I guess technically, it is still under AGPL, since I cannot revoke that, but the MIT license is more permissive, so people should be made clear that it is available under that. I need to fix this in my readme and project page. |
Awesome, thanks for letting me know. The next step here is to make it more module-friendly, meaning being able to do this:
while preserving the ability to do:
I toyed around this, but I didn't found a way to do it without either modifying the source code or adding some build system (webpack, rollup, etc.), which seemed too intrusive. But in the event this is something you'd be interested in, please let me know and I can help. Btw, I also created a React component (https://github.com/fvictorio/react-besogo) for this. It justs includes the library and uses it. The downside here is that it pollutes the global space by setting |
Thanks for all of your help, @fvictorio. I will look into understanding how to refactor the code to make things module-friendly. Are there some resources or tutorials that you could suggest? Or could you suggest the specific changes? By the way, regarding this commit: fvictorio@ecbd616 |
This explanation looks good for getting the context. Then, I would probably use some tool. In this case I would suggest rollup. Webpack is more popular, but it's complex and more useful for apps. If you decide to go with rollup, then I think the changes you would need to make are:
Let me know any questions you have!
Sure! There you go: #15 |
Hi, I would love to use this in a project. Would you consider publishing it in npm so that it's easier to install? I can probably help you with that if you want.
The text was updated successfully, but these errors were encountered: