折腾:
【已解决】搭建Gitbook环境使得可以发布book到crifan.com上
期间,去mac本地搭建一个gitbook试试。
mac gitbook 搭建
mac gitbook
在自己的电脑上安装 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
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
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])
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环境