You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,10 @@ Returns a group of remotes. `names` is a list of redefined remotes. Note that or
46
46
The current remotes are:
47
47
48
48
-`remotes.github`
49
+
-`remotes.bitbucket`
49
50
-`remotes.local` - use downloaded components
50
51
51
-
The list of names can be found at `Remotes.remotes`. These are also aliased with their title-cased versions.
52
+
The list of names can be found at `Remotes.remotes`.
52
53
53
54
Some options are:
54
55
@@ -68,7 +69,9 @@ Returns the first remote with `<repo>@<ref>` from the list of remotes. You may o
68
69
69
70
Some remotes, such as GitHub, require authentication. We suggest you use [netrc](https://github.com/CamShaft/netrc).
70
71
71
-
For Github, you need to supply you username and password for the `api.github.com` host. You may also set the `GITHUB_USERNAME` and `GITHUB_PASSWORD` environmental variables.
72
+
For Github, you need to supply you username and password for the `api.github.com` host.
73
+
You may also set the `GITHUB_USERNAME` and `GITHUB_PASSWORD` environmental variables.
74
+
Similarly, for BitBucket, you set `BITBUCKET_USERNAME` and `BITBUCKET_PASSWORD`.
72
75
73
76
## Using a Remote
74
77
@@ -111,6 +114,14 @@ Return an object containing absolute URLs of where to download this repo's archi
111
114
}
112
115
```
113
116
117
+
## Remote Notes
118
+
119
+
- Only `master` is supported as the default branch.
120
+
121
+
### BitBucket
122
+
123
+
- Git trees are not supported, so please don't use globs in your `component.json`s!
124
+
114
125
## Creating your own Remote
115
126
116
127
You may create your own remote. See the [remotes](https://github.com/component/remotes.js/tree/master/lib/remotes/github.js) for implementation examples.
@@ -147,6 +158,8 @@ The following properties must be implemented. Note that if you want a remote to
147
158
-`.file()`
148
159
-`.archive()`
149
160
161
+
If a function is not supported, simply do not define it.
162
+
For example, BitBucket does not support git trees, so `._tree()` is not defined.
150
163
151
164
## License
152
165
@@ -170,4 +183,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
170
183
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
171
184
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
172
185
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
0 commit comments