From 586ad6d39f444943a2250bf9cb6b597b48269080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=9D=E7=A0=81?= Date: Sat, 29 Dec 2018 16:55:45 +0800 Subject: [PATCH 1/2] feat: optimize clone repo --- bin/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index f4ddd63..26c6f52 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -90,12 +90,13 @@ function runGenerator(Generator) { } async function cloneAntdPro() { - console.log(`git clone https://github.com/umijs/ant-design-pro ${args._[0] || './'}`); + console.log(`git clone https://github.com/umijs/ant-design-pro --depth=1 ${args._[0] || './'}`); await require('execa')( `git`, [ `clone`, `https://github.com/umijs/ant-design-pro`, + `--depth=1` args._[0] || './', ], ); From 8dd62438164fcafdbc31a0bfa1fa198c8e03c2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=9D=E7=A0=81?= Date: Sat, 29 Dec 2018 16:58:10 +0800 Subject: [PATCH 2/2] fix: missing comma --- bin/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index 26c6f52..52d1b8a 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -96,7 +96,7 @@ async function cloneAntdPro() { [ `clone`, `https://github.com/umijs/ant-design-pro`, - `--depth=1` + `--depth=1`, args._[0] || './', ], );