Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Run = &cli.Command{ Name: global.CmdSync2, Usage: "sync2 gitbook, 不包含node_modules, suggest", Flags: []cli.Flag{ &cli.StringFlag{ Name: "source", Usage: "gitbook数据源", Value: "https://github.com/gofulljs/gitbook/archive/refs/tags/3.2.3.tar.gz", }, &cli.StringFlag{ Name: "proxy1", Usage: fmt.Sprintf(`自定义加速源(前缀+source), 不传采用以下\n%v`, global.Proxy1s), }, &cli.StringFlag{ Name: "proxy2", Usage: `自定义加速源(替换https://github.com前缀)`, }, }, Action: func(cctx *cli.Context) error { _, bookHome, bookVersionPath, err := cmdutil.GetBookVars(cctx) if err != nil { return err } if checkGitbookIsExist(bookVersionPath) { return nil } err = MustDownloadGitbook(bookHome, cctx.String("proxy1"), cctx.String("proxy2"), cctx.String("source")) if err != nil { return err } return nodeInstall(bookVersionPath) }, }
Functions ¶
func MustDownloadGitbook ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.