最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

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

gitbook crifan 560浏览 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 ignore@3.1.2: several bugs fixed in v3.2.1

npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

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

> fsevents@1.1.3 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

+ gitbook@3.2.3

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

+ gitbook-cli@2.3.2

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

gitbook@3.2.3 ../../../../../var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/tmp-601967RhkhhCcBTj0/node_modules/gitbook

├── escape-html@1.0.3

├── escape-string-regexp@1.0.5

├── destroy@1.0.4

├── ignore@3.1.2

├── bash-color@0.0.4

├── gitbook-plugin-livereload@0.0.1

├── cp@0.2.0

├── graceful-fs@4.1.4

├── nunjucks-do@1.0.0

├── github-slugid@1.0.1

├── direction@0.1.5

├── q@1.4.1

├── spawn-cmd@0.0.2

├── gitbook-plugin-fontsettings@2.0.0

├── open@0.0.5

├── is@3.2.1

├── object-path@0.9.2

├── extend@3.0.1

├── json-schema-defaults@0.1.1

├── gitbook-plugin-search@2.2.1

├── jsonschema@1.1.0

├── crc@3.4.0

├── urijs@1.18.0

├── semver@5.1.0

├── immutable@3.8.2

├── front-matter@2.3.0

├── dom-serializer@0.1.0 (domelementtype@1.1.3, entities@1.1.1)

├── error@7.0.2 (string-template@0.2.1, xtend@4.0.1)

├── omit-keys@0.1.0 (isobject@0.2.0, array-difference@0.0.1)

├── send@0.13.2 (statuses@1.2.1, etag@1.7.0, range-parser@1.0.3, fresh@0.3.0, ms@0.7.1, depd@1.1.1, mime@1.3.4, debug@2.2.0, http-errors@1.3.1, on-finished@2.3.0)

├── tmp@0.0.28 (os-tmpdir@1.0.2)

├── npmi@2.0.1 (semver@4.3.6)

├── mkdirp@0.5.1 (minimist@0.0.8)

├── rmdir@1.2.0 (node.flow@1.2.3)

├── resolve@1.1.7

├── fresh-require@1.0.3 (is-require@0.0.1, shallow-copy@0.0.1, sleuth@0.1.1, astw@1.3.0, through2@0.6.5, escodegen@1.9.0, acorn@0.9.0)

├── cpr@1.1.1 (rimraf@2.4.5)

├── js-yaml@3.10.0 (esprima@4.0.0, argparse@1.0.9)

├── tiny-lr@0.2.1 (parseurl@1.3.2, livereload-js@2.2.2, qs@5.1.0, debug@2.2.0, body-parser@1.14.2, faye-websocket@0.10.0)

├── read-installed@4.0.3 (debuglog@1.0.1, util-extend@1.0.3, slide@1.1.6, readdir-scoped-modules@1.0.2, read-package-json@2.0.12)

├── gitbook-plugin-theme-default@1.0.7

├── gitbook-plugin-lunr@1.2.0 (html-entities@1.2.0, lunr@0.5.12)

├── gitbook-plugin-highlight@2.0.2 (highlight.js@9.2.0)

├── moment@2.13.0

├── gitbook-plugin-sharing@1.0.2 (lodash@3.10.1)

├── juice@2.0.0 (deep-extend@0.4.2, slick@1.12.2, batch@0.5.3, cssom@0.3.1, commander@2.9.0, cross-spawn-async@2.2.5, web-resource-inliner@2.0.0)

├── i18n-t@1.0.1 (lodash@4.17.4)

├── cheerio@0.20.0 (entities@1.1.1, css-select@1.2.0, htmlparser2@3.8.3, jsdom@7.2.2, lodash@4.17.4)

├── gitbook-asciidoc@1.2.2 (gitbook-html@1.3.3, asciidoctor.js@1.5.5-1, lodash@4.17.4)

├── gitbook-markdown@1.3.2 (kramed-text-renderer@0.2.1, gitbook-html@1.3.3, kramed@0.5.6, lodash@4.17.4)

├── request@2.72.0 (aws-sign2@0.6.0, tunnel-agent@0.4.3, oauth-sign@0.8.2, forever-agent@0.6.1, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, aws4@1.6.0, isstream@0.1.2, json-stringify-safe@5.0.1, tough-cookie@2.2.2, node-uuid@1.4.8, qs@6.1.2, combined-stream@1.0.5, mime-types@2.1.17, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6, form-data@1.0.1)

├── npm@3.9.2

├── chokidar@1.5.0 (path-is-absolute@1.0.1, async-each@1.0.1, inherits@2.0.3, glob-parent@2.0.0, is-binary-path@1.0.1, is-glob@2.0.1, readdirp@2.1.0, anymatch@1.3.2, fsevents@1.1.3)

└── nunjucks@2.5.2 (asap@2.0.6, yargs@3.32.0, chokidar@1.7.0)

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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
54 queries in 0.242 seconds, using 12.15MB memory