最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】Mac本地搭建Gitbook环境

gitbook crifan 3819浏览 0评论

折腾:

【已解决】搭建Gitbook环境使得可以发布book到crifan.com上

期间,去mac本地搭建一个gitbook试试。

mac gitbook 搭建

mac gitbook

Mac GitBook安装和使用 – 简书

Mac环境安装Gitbook,并导出PDF教程 – 简书

在自己的电脑上安装 GitBook For Mac | Cafeting

参考:

http://www.jianshu.com/p/4824d216ad10

去:

➜  gitbook node -v

v9.0.0

➜  gitbook npm install gitbook -g

npm WARN deprecated [email protected]: several bugs fixed in v3.2.1

npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130

npm WARN deprecated [email protected]: Use uuid module instead

/usr/local/bin/gitbook -> /usr/local/lib/node_modules/gitbook/bin/gitbook.js

> [email protected] install /usr/local/lib/node_modules/gitbook/node_modules/fsevents

> node install

[fsevents] Success: “/usr/local/lib/node_modules/gitbook/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node” is installed via remote

+ [email protected]

added 732 packages in 43.226s

➜  gitbook npm install -g gitbook-cli

/usr/local/bin/gitbook -> /usr/local/lib/node_modules/gitbook-cli/bin/gitbook.js

+ [email protected]

added 578 packages in 13.64s

但是接着去看版本,结果卡死在Installing GitBook了:

➜  gitbook gitbook -V

CLI version: 2.3.2

Installing GitBook 3.2.3

去看看,好像也是安装成功的:

➜  gitbook gitbook –help

  Usage: gitbook [options] [command]

  Options:

    -v, –gitbook [version]  specify GitBook version to use

    -d, –debug              enable verbose error

    -V, –version            Display running versions of gitbook and gitbook-cli

    -h, –help               output usage information

  Commands:

    ls                        List versions installed locally

    current                   Display currently activated version

    ls-remote                 List remote versions available for install

    fetch [version]           Download and install a <version>

    alias [folder] [version]  Set an alias named <version> pointing to <folder>

    uninstall [version]       Uninstall a version

    update [tag]              Update to the latest version of GitBook

    help                      List commands for GitBook

    *                         run a command with a specific gitbook version

但:

gitbook –version

还是卡死

过了好一会,显示完整了:

➜  gitbook gitbook –version

CLI version: 2.3.2

Installing GitBook 3.2.3

[fsevents] Success: “/private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-601967RhkhhCcBTj0/node_modules/gitbook/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node” is installed via remote

[fsevents] Success: “/private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-601967RhkhhCcBTj0/node_modules/gitbook/node_modules/nunjucks/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node” is installed via remote

[email protected] ../../../../../var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-601967RhkhhCcBTj0/node_modules/gitbook

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected])

├── [email protected] ([email protected])

├── [email protected] ([email protected])

├── [email protected] ([email protected])

├── [email protected]

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected])

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected]

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected])

├── [email protected]

├── [email protected] ([email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

├── [email protected]

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]0, [email protected], [email protected])

└── [email protected] ([email protected], [email protected], [email protected])

GitBook version: 3.2.3

然后终于正常了:

➜  gitbook gitbook -V

CLI version: 2.3.2

GitBook version: 3.2.3

➜  gitbook

再去:

https://www.gitbook.com/editor/

下载编辑器

启动后,去试试:

【记录】试用Gitbook Editor去编辑Markdown的文章

转载请注明:在路上 » 【记录】Mac本地搭建Gitbook环境

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
87 queries in 0.110 seconds, using 20.73MB memory