Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1073ee5

Browse files
committed
Merge pull requestvuejs#17 from flipxfx/master
Add --clone flag to download from private repos
2 parents4226c3d +69780d4 commit1073ee5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

‎README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Where `username/repo` is the GitHub repo shorthand for your fork.
4949

5050
The shorthand repo notation is passed to[download-git-repo](https://github.com/flipxfx/download-git-repo) so you can also use things like`bitbucket:username/repo` for a Bitbucket repo and`username/repo#branch` for tags or branches.
5151

52+
If you would like to download from a private repository use the`--clone` flag and the cli will use`git clone` so your SHH keys are used.
53+
5254
You can also create your own template from scratch:
5355

5456
- A template repo**must** have a`template` directory that holds the template files.

‎bin/vue-init

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var getGitUser = require('../lib/git-user')
1919

2020
program
2121
.usage('<template-name> <project-name>')
22+
.option('-c, --clone','use git clone')
2223

2324
/**
2425
* Help.
@@ -60,6 +61,7 @@ var hasSlash = template.indexOf('/') > -1
6061
varname=program.args[1]
6162
vardir=program.directory
6263
varto=resolve(name)
64+
varclone=program.clone||false
6365
if(exists(to))logger.fatal('"%s" already exists.',name)
6466

6567
/**
@@ -86,7 +88,7 @@ if (hasSlash && exists(template)) {
8688
*/
8789

8890
vartmp='/tmp/vue-template-'+uid()
89-
download(template,tmp,function(err){
91+
download(template,tmp,{clone:clone},function(err){
9092
if(err)logger.fatal(err)
9193
generate(tmp,to,function(err){
9294
if(err)logger.fatal(err)

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"dependencies": {
2929
"chalk":"^1.1.1",
3030
"commander":"^2.9.0",
31-
"download-git-repo":"^0.0.1",
31+
"download-git-repo":"^0.1.1",
3232
"khaos-patched":"^0.9.3",
3333
"read-metadata":"^1.0.0",
3434
"request":"^2.67.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp