Skip to content

Conversation

@antfu
Copy link
Member

@antfu antfu commented Dec 21, 2019

This continues #241

This PR publishes npm packages under @wenyanlang scope which I access to. I have invited you to the organization.

For now, this project is published by 4 packages

  • @wenyanlang/core - Exposes the src/parser.js file
  • @wenyanlang/render - Exposes the src/render.js file
  • @wenyanlang/highlighter - Exposes the src/highlight.js file
  • @wenyanlang/cli - Exposes the src/cli.js file, can be installed by npm i -g @wenyanlang/cli

Changes

  • Added a publish scripts that build and publish these packages automatically. It will be called by Github Actions on new releases. Or you can manually publish by npm run publish
  • Since we have published the packages, scripts can be accessed by using unpkg. I have change make_ide and make_site from embedding code to import online scripts.
+ <script src="https://unpkg.com/@wenyanlang/core/index.min.js"></script>
+ <script src="https://unpkg.com/@wenyanlang/highlighter/index.min.js"></script>
  • Bundled standard library into @wenyanlang/core
  • Make reader of @wenyanlang/core not do anything by default since fs can not be bundled to browser
  • npm run make_cmdline is removed. use npm run build instead.
  • @wenyanlang/core on browser-side will be exported as window.Wenyan
Wenyan.compile(...)

I will update the docs about the cli and API later. Since it's quite a lot of changes, please feel to leave any comments. Thanks

@LingDong- LingDong- merged commit 503bbba into wenyan-lang:master Dec 21, 2019
@LingDong-
Copy link
Member

Everything is breaking! oh no, I'll take a look

@antfu
Copy link
Member Author

antfu commented Dec 21, 2019

@LingDong- Sorry for that, I will have a quick fix!

@antfu antfu mentioned this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants