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

[ANNOUNCEMENT] Examples for packages #13

Open
antfu opened this issue Mar 13, 2020 · 3 comments
Open

[ANNOUNCEMENT] Examples for packages #13

antfu opened this issue Mar 13, 2020 · 3 comments

Comments

@antfu
Copy link
Member

antfu commented Mar 13, 2020

Hi guys. From wyg 0.2.2, we supported a new field examples for your packages.

You can now specify examples' names in registry-packages.ts

For example:

{
name: '子曰',
repo: 'antfu/ziyue-wy',
description: 'Cowsay for wenyan-lang',
author: {
name: 'antfu',
url: 'https://github.com/antfu',
},
aliases: ['ziyue'],
examples: ['例一'],
},

It will refer to https://github.com/antfu/ziyue-wy/blob/master/例一.wy

Then users will see the examples in our Online IDE
image

image

Feel free to add examples for your packages! Cheers!

cc @lymslive @akira-cn @GLanguage @alainsaas @xingzilong

@GLanguage
Copy link
Contributor

Great! But does it mean that we have to reinstall the packages in order to get the examples?

@antfu
Copy link
Member Author

antfu commented Mar 13, 2020

does it mean that we have to reinstall the packages in order to get the examples?

In the Online IDE, there is no need to reinstall. The IDE will fetch the latest packages info and only download scripts when users import them.

For local installation by wyg install xx, yes, people need to reinstall packages to get the examples. But since the examples do not affect the packages code, unless you do need to download the examples to your disk, there is no need to reinstall.

@GLanguage
Copy link
Contributor

OK, thanks. And examples are added :P

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

No branches or pull requests

2 participants