Skip to content

Commit 8bc8efe

Browse files
committed
add some docs on publishing components
1 parent 2c67145 commit 8bc8efe

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

Readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ You can always view the boring [history.md](https://github.com/component/compone
3232

3333
Guide to Creating Components:
3434

35+
- [Publishing Components](creating-components/publishing.md)
36+
- [Standalone UMD Builds](creating-components/standalone-umd-builds.md)
3537
- [Best Practices](creating-components/best-practices.md)
3638

3739
Guide to Creating Apps with Components:

creating-components/publishing.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
## Pushing Git Tags
3+
4+
Unlike Bower or NPM, Component does not have its own registry.
5+
Instead, you simply `git push` semantically versioned tags.
6+
For example, to publish version `1.0.0` of a component:
7+
8+
```js
9+
git commit -a -m "1.0.0"
10+
git push origin master 1.0.0
11+
```
12+
13+
### Crawling
14+
15+
Instead of publishing, Component has a [crawler](https://github.com/component/crawler.js) that crawls all a GitHub user/organization's repositories.
16+
All crawled repositories will be discoverable through http://component.io as well as `component search`.
17+
18+
However, there are rules to being crawled:
19+
20+
- A `component.json` must exist in the default branch
21+
- GitHub issues __must__ be enabled
22+
23+
## Best Practices
24+
25+
### Stick to `master`
26+
27+
In general, you should stick with `master` as your default branch.
28+
By default, Component will check `master` for a `component.json` to check whether the repository is a "component".
29+
Supporting default branches other than `master` would require additional HTTP requests as well as use GitHub API requests.
30+
31+
### Don't prefix `v` to the version
32+
33+
This isn't a big deal, but you should generally not prefix versions with a `v`.
34+
Component will handle both cases, but doing so requires an extra HTTP request.

0 commit comments

Comments
 (0)