-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Distribute npm packages #241
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
Conversation
|
Sounds very promising. I'm wondering if this would be a painless transition? If not, I think we might need to take this one easy, since there're still many features being added to the language, and there's the testing framework I need to learn, and bugs to fix. I don't want too many things to break at the same time :P |
Yes. It can be. Basically It will only change the building scripts and nothing affects the compiler. I would also keep 3rd-party tools as minimum as possible. Anyway, you can hold this PR until you feel good about it.
IMHO, Yes. Besides the benefits I listed above (which I think it's rather important). As I am developing the extension I have embedded the compiler into to extension to make users work out of the box. Every update or fix I need to manually copy and paste the file into my vendor directory. It's kinda less effective. I believe users won't do this procedure very often. Also, exporting the parser or the programmable API would help others to build the ecosystem easily. It's also kinda important as the rapid growth stage of this project is, from my point of view. |
|
I see! Feel free to go ahead then! Let me know what I can do to help. Thanks again. |
|
I think I have done the building and package publishing scripts. The package name will be You need to do some secret token set up in order to make it work. When you got the npm token, paste it into secrets of this repo named Please refer to this article: https://sergiodxa.com/articles/github-actions-npm-publish/ After that, you can create a new Github Release. Github Actions will publish the package every time you create a release. When you need to bump the version, you can run $ npm run release |
|
Hi @antfu, EDIT: I checked Github Actions and it seems to be complaining about the lack of |
|
@LingDong- Oh I am sorry. Seems the name is occupied by someone else just now. https://www.npmjs.com/package/wenyan-lang I am not too sure how to deal with this circumstance. Maybe we can contact him/her to transfer the ownership or we just change the name and try again. |
|
Yes, I just figured that too, all these related names are squatted by this same person. Yet I couldn't find this person's contact information. Not sure what he wants. |
|
@LingDong- Have just sent you an email. I think it's better to discuss privately. |
|
@antfu I saw your email and replied to it. Thanks! |




This is a proposal, not yet finished.
I have opened this for discussing whether we should distribute it as npm packages.
Here are the advantages I think could be helpful for distributing as packages.
npm i -gcan make the executable exposed to the user environments, no more os-specific build required)@wenyan-lang/parser(for ast and syntax highlight)@wenyan-lang/cli(command line)@wenyan-lang/core(for browser or API calls)In order to archive this, we may need to do the following things:
I would like to know what do you think about this before I dig into it. Thanks!