From 85a0a786930c7439d21f3110f0495ee81cab5c1f Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Fri, 13 Nov 2020 17:49:37 +0800 Subject: [PATCH 1/2] fix: alias not working --- lib/cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index 81e23f0..ce2c6d1 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -21,7 +21,7 @@ require('yargs') .usage(chalk.bold(y18n.__('usage') + ': docsify ')) .command({ command: 'init [path]', - alias: 'i', + aliases: 'i', desc: chalk.gray(y18n.__('init')), builder: yargs => yargs.options({ @@ -47,7 +47,7 @@ require('yargs') }) .command({ command: 'serve [path]', - alias: 's', + aliases: 's', desc: chalk.gray(y18n.__('serve')), builder: yargs => yargs.options({ From 42f3485009010f516f463db245aeb84492621b1a Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Fri, 13 Nov 2020 17:51:46 +0800 Subject: [PATCH 2/2] update e2e --- e2e/cli.test.js.md | 16 ++++++++-------- e2e/cli.test.js.snap | Bin 610 -> 626 bytes 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/cli.test.js.md b/e2e/cli.test.js.md index 9d2c7f0..5ba41c6 100644 --- a/e2e/cli.test.js.md +++ b/e2e/cli.test.js.md @@ -11,8 +11,8 @@ Generated by [AVA](https://ava.li). `Usage: docsify ␊ ␊ Commands:␊ - docsify init [path] Creates new docs␊ - docsify serve [path] Run local server to preview site.␊ + docsify init [path] Creates new docs [aliases: i]␊ + docsify serve [path] Run local server to preview site. [aliases: s]␊ docsify start Server for SSR␊ ␊ Global Options␊ @@ -35,8 +35,8 @@ Generated by [AVA](https://ava.li). `Usage: docsify ␊ ␊ Commands:␊ - docsify init [path] Creates new docs␊ - docsify serve [path] Run local server to preview site.␊ + docsify init [path] Creates new docs [aliases: i]␊ + docsify serve [path] Run local server to preview site. [aliases: s]␊ docsify start Server for SSR␊ ␊ Global Options␊ @@ -57,8 +57,8 @@ Generated by [AVA](https://ava.li). `Usage: docsify ␊ ␊ Commands:␊ - docsify init [path] Creates new docs␊ - docsify serve [path] Run local server to preview site.␊ + docsify init [path] Creates new docs [aliases: i]␊ + docsify serve [path] Run local server to preview site. [aliases: s]␊ docsify start Server for SSR␊ ␊ Global Options␊ @@ -79,8 +79,8 @@ Generated by [AVA](https://ava.li). `Usage: docsify ␊ ␊ Commands:␊ - docsify init [path] Creates new docs␊ - docsify serve [path] Run local server to preview site.␊ + docsify init [path] Creates new docs [aliases: i]␊ + docsify serve [path] Run local server to preview site. [aliases: s]␊ docsify start Server for SSR␊ ␊ Global Options␊ diff --git a/e2e/cli.test.js.snap b/e2e/cli.test.js.snap index 5de7e791021e11570d74b0e5caa5fa38c263c11c..5a0dff14cb3a00c6f02901971b061d5cf2e92bef 100644 GIT binary patch literal 626 zcmV-&0*(DaRzVGZngouTRC@+?h+fzt&Bq>ZJq{+!{t~ky^XZI$zlkCncJ9Bp$MGG4{ zi-=fUp-B`awP~WH5UZetD2k=_3RWp1IJ3pIFIyqpu$x+j^zN>SMKU9uS2T?tA1{s5q z084jF*T=c&8&asz;nW=QR&uggYq5i&sLznO7LtUy@xt_s zId!f$Gc`SF_*GpmpEu2dS%EWv!&=z8g9!p6AWrmN7@T&__9V2DBs59r z!6h`wT9UQ@ku~k4-g9c_CZbBi#;|c#|5tD7N|NCu!w31J7uh`HP1gO-^DtLu^NwHr M2}}ewZ2JlT01vP%UjP6A literal 610 zcmV-o0-gOqRzV(AmAo?Iyc3%g)>#{y_^H zI|W57u22&}No|@KQixU1N>MDevQe-~5y6?g%Xv1zq~3vTKEC&RZ{B_|&k#cW$oTdW zZ~t6hIo51hTd&^V(~vq&3Zd06gO5M8E}w3GsQudfc5(fBN?NRL_9K*z&TfBxeP%V|PriFPwDVSr)$j7VeZsbPqep#T@2)(*!Om@Hv3ha< zA+odn!n&Sbc=BU(ZLl?YM~l_UQAtAs@ibZ=I-V+~N*vcn4yw%I-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