Skip to content
This repository was archived by the owner on Sep 6, 2024. It is now read-only.

Commit 592fb3a

Browse files
committed
add publish
1 parent dd68a04 commit 592fb3a

File tree

5 files changed

+89
-8
lines changed

5 files changed

+89
-8
lines changed

.vitepress/config.mts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
{ text: "Getting Start", link: "/getstart" },
3535
{ text: "Installation", link: "/install" },
3636
{ text: "First Project", link: "/newproject" },
37+
{ text: "Publish", link: "/etc/publish" },
3738
],
3839
},
3940
{

etc/publish.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Publishing on gallery
2+
3+
4+
When you're ready to share your library, you can publish it on [gallery](https://gallery.vein-lang.org)!
5+
Publishing a shard package involves uploading a particular version to be hosted on [gallery](https://gallery.vein-lang.org).
6+
7+
Be cautious when publishing a shard package, as it is a permanent action.
8+
The version cannot be altered once published, and the code cannot be removed.
9+
However, you can publish as many versions as you like.
10+
Also shard package can be marked as depracated and not recommended to use.
11+
12+
13+
14+
## Before your first publish
15+
16+
To get started, you’ll need an account on [gallery](https://gallery.vein-lang.org) to get an API token.
17+
Go to the home page and log in using your GitHub account.
18+
After that, create an API token and be sure to copy it.
19+
20+
21+
Then run `config set` command for save api token.
22+
```bash
23+
$ rune config set registry:api:token "YourApiToken"
24+
```
25+
26+
This command will inform registry of your API token and store it locally in your ~/.vein/vcfg
27+
Note that this token is a secret and should not be shared with anyone else.
28+
If it leaks for any reason, you should revoke it immediately.
29+
30+
:::tip
31+
~/.vein/vcfg has encrypted by device token
32+
:::
33+
34+
35+
36+
## Before publishing a new shard
37+
38+
39+
Keep in mind that shard names on [gallery](https://gallery.vein-lang.org) are allocated on a first-come-first-serve basis.
40+
Once a shard name is taken, it cannot be used for another shard.
41+
42+
:::tip
43+
In the future, it is also planned to expand the functionality to create scoped packages for organizations
44+
`@thebestcompany/shardname` e.g
45+
:::
46+
47+
48+
Check out the metadata you can specify in project.vproj to ensure your shard can be discovered more easily!
49+
Before publishing, make sure you have filled out the following fields:
50+
51+
- license
52+
- description
53+
- authors
54+
- repository
55+
56+
It would also be a good idea to include some keywords and categories, though they are not required.
57+
58+
:::tip
59+
also dont forget mark project as packable
60+
61+
```yaml
62+
packable: true
63+
```
64+
:::
65+
66+
67+
68+
69+
## Uploading the shard
70+
71+
When you are ready to publish, use the `rune publish` command to upload to crates.io:
72+
73+
```bash
74+
$ rune publish
75+
```
76+
And that’s it, you’ve now published your first shard!

getstart.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
- [Installation](/install)
44
- [New Project](/newproject)
5+
- [Publishing](/etc/publish)
56
- [Vein Package Gallery](https://gallery.vein-lang.org)

install.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ VeinSDK requires a minimum of Windows 10 version 1809
2626
## Checking installation
2727

2828
```bash [macOS/Linux (curl)]
29-
$ vein --version
30-
Vein 0.*
29+
$ rune --version
30+
Vein SDK 0.*
31+
[ishtar] 0.*
32+
[veinc] 0.*
33+
[rune] 0.*
3134
```
3235

3336

newproject.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Generating a new project
22

33
Let’s write a small application with our new Vein development environment.
4-
To start, we’ll use vein to make a new project for us.
4+
To start, we’ll use rune to make a new project for us.
55
In your terminal of choice run:
66

77
```bash [console]
8-
vein new
8+
rune new
99
```
1010

1111

@@ -43,13 +43,13 @@ packages:
4343
We can also do this by running
4444
4545
```bash
46-
vein add cow
46+
rune add cow
4747
```
4848

4949
Now we can run:
5050

5151
```bash
52-
vein build
52+
rune build
5353
```
5454

5555
## Fast start
@@ -58,7 +58,7 @@ vein build
5858
cd ~/
5959
mkdir cool_project
6060
cd cool_project
61-
vein new
62-
vein run
61+
rune new
62+
rune run
6363
code .
6464
```

0 commit comments

Comments
 (0)