Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
⚡ improvement(gitbook): update gitbook templating for github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Aug 26, 2016
1 parent 5ff36ae commit 2c5195c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module.exports = {
"config/karma.coveralls.conf.js": 'coveralls',
".flowconfig": 'flow',
"decls/*": 'flow',
"gitbook/**/**": 'gitbook',
"docs/**/**": 'gitbook',
".github/ISSUE_TEMPLATE.md": 'issue',
"CONTRIBUTING.md": "contribution"
Expand Down
Empty file added template/docs/.gitkeep
Empty file.
File renamed without changes.
7 changes: 4 additions & 3 deletions template/docs/book.json → template/gitbook/book.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"gitbook": "2.x.x",
"plugins": ["edit-link", "github", "advanced-emoji"],
"gitbook": "3.x.x",
"root": "./",
"plugins": ["edit-link", "github", "advanced-emoji@0.2.1"],
"pluginsConfig": {
{{#unless_eq githubAccount ""}}
"edit-link": {
"base": "https://github.com/{{ githubAccount }}/{{ name }}/tree/{{ branch }}/docs",
"base": "https://github.com/{{ githubAccount }}/{{ name }}/tree/{{ branch }}/gitbook",
"label": "Edit This Page"
},
"github": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"eslint-config-vue": "^1.0.0",
"eslint-loader": "^1.3.0",
{{#gitbook}}
"gitbook-cli": "^2.2.0",
"gitbook-cli": "^2.3.0",
{{/gitbook}}
"html-webpack-plugin": "^2.19.0",
"jasmine": "^2.4.1",
Expand Down Expand Up @@ -100,26 +100,22 @@
},
{{/unless_eq}}
"scripts": {
"build": "NODE_ENV=production node config/build.js",
"build": "NODE_ENV=production node config/build.js{{#gitbook}} && npm run docs:build{{/gitbook}}",
{{#conventional}}
"changelog": "conventional-changelog -i CHANGELOG.md -s {{#unless_eq conventionalConfig "none"}}-p {{ conventionalConfig }}{{/unless_eq}}{{#if_eq conventionalConfig "none"}}-n ./config/convention.js{{/if_eq}}",
"release": "conventional-github-releaser {{#unless_eq conventionalConfig "none"}}-p {{ conventionalConfig }}{{/unless_eq}}{{#if_eq conventionalConfig "none"}}-n ./config/convention.js{{/if_eq}}",
{{/conventional}}
"clean": "rm -rf coverage && rm -rf dist/*.js* && rm ./*.log",
"dev": "webpack-dev-server --quiet --config config/webpack.dev.conf.js --host 0.0.0.0",
{{#gitbook}}
"docs": "cd docs && gitbook serve",
{{#unless_eq githubAccount ""}}
"docs:deploy": "cd docs && rm -rf _book && gitbook build && cd _book && git init && git add -A && git commit -m 'update book' && git push -f git@github.com:{{ githubAccount }}/{{ name }}.git master:gh-pages && cd .. && cd ..",
{{/unless_eq}}
"docs": "gitbook serve ./gitbook ./docs",
"docs:build": "gitbook build ./gitbook ./docs",
"docs:install": "gitbook install ./gitbook",
{{/gitbook}}
{{#flow}}
"flow": "flow check",
{{/flow}}
"lint": "eslint src test config",
{{#gitbook}}
"postinstall": "cd docs && gitbook install && cd ..",
{{/gitbook}}
{{#sauce}}
"sauce": "npm run sauce:coolkids && npm run sauce:ie && npm run sauce:mobile",
"sauce:coolkids": "NODE_ENV=development karma start config/karma.sauce.conf.js -- 0",
Expand Down

0 comments on commit 2c5195c

Please sign in to comment.