diff --git a/meta.js b/meta.js index 70bef9a..e0a6a05 100644 --- a/meta.js +++ b/meta.js @@ -92,9 +92,9 @@ module.exports = { { name: 'jshint', value: 'jshint' } ] }, - gitbook: { + docs: { type: 'confirm', - message: 'Setup gitbook documentaion?' + message: 'Setup documentaion?' }, issue: { type: 'confirm', @@ -112,9 +112,8 @@ module.exports = { ".travis.yml": "ciConfig === 'travis'", "circle.yml": "ciConfig === 'circleci'", "config/karma.coveralls.conf.js": "coverageConfig === 'coveralls'", - "gitbook/**/**": 'gitbook', - "docs/**/**": 'gitbook', - "config/version.js": 'gitbook', + "docs/**/**": 'docs', + "config/version.js": 'docs', ".github/ISSUE_TEMPLATE.md": 'issue', "CONTRIBUTING.md": "contribution" }, diff --git a/template/docs/.vuepress/config.js b/template/docs/.vuepress/config.js new file mode 100644 index 0000000..d25831a --- /dev/null +++ b/template/docs/.vuepress/config.js @@ -0,0 +1,29 @@ +module.exports = { + locales: { + '/': { + lang: 'en-US', + title: '{{ classify name }}', + description: '{{ classify name }} for Vue.js' + } + }, + themeConfig: { + repo: '{{ githubAccount }}/{{ name }}', + docsDir: 'docs', + locales: { + '/': { + label: 'English', + selectText: 'Languages', + editLinkText: 'Edit this page on GitHub', + nav: [{ + text: 'Release Notes', + link: 'https://github.com/{{ githubAccount }}/{{ name }}/releases' + }], + sidebar: [ + '/installation.md', + '/started.md', + ] + } + } + } +} + diff --git a/template/docs/README.md b/template/docs/README.md new file mode 100644 index 0000000..85bef2f --- /dev/null +++ b/template/docs/README.md @@ -0,0 +1,10 @@ +# Introduction + +`{{ classify name }}` plugin is plugin for [Vue.js](http://vuejs.org). +Features include: + +- Feature1 +- Feature2 +- ... + +[Get started](./started/) or play with the [examples](https://github.com/{{ githubAccount }}/{{ name }}/tree/dev/examples) (see [`README.md`](https://github.com/{{ githubAccount }}/{{ name }}/) to run them). diff --git a/template/gitbook/en/installation.md b/template/docs/installation.md similarity index 77% rename from template/gitbook/en/installation.md rename to template/docs/installation.md index c914779..9932062 100644 --- a/template/gitbook/en/installation.md +++ b/template/docs/installation.md @@ -1,6 +1,6 @@ # Installation -### Direct Download / CDN +## Direct Download / CDN https://unpkg.com/{{ name }}/dist/{{ name }} @@ -13,13 +13,17 @@ Include {{ name }} after Vue and it will install itself automatically: ``` -### NPM +## NPM - $ npm install {{ name }} +```sh +$ npm install {{ name }} +``` -### Yarn +## Yarn - $ yarn add {{ name }} +```sh +$ yarn add {{ name }} +``` When used with a module system, you must explicitly install the `{{ name }}` via `Vue.use()`: @@ -33,13 +37,16 @@ Vue.use({{ classify name }}) You don't need to do this when using global script tags. {{#unless_eq githubAccount ""}} -### Dev Build +## Dev Build You will have to clone directly from GitHub and build `{{ name }}` yourself if you want to use the latest dev build. - $ git clone https://github.com/{{ githubAccount }}/{{ name }}.git node_modules/{{ name }} - $ cd node_modules/{{ name }} - $ npm install - $ npm run build +```sh +$ git clone https://github.com/{{ githubAccount }}/{{ name }}.git node_modules/{{ name }} +$ cd node_modules/{{ name }} +$ npm install +$ npm run build +``` + {{/unless_eq}} diff --git a/template/gitbook/en/started.md b/template/docs/started.md similarity index 96% rename from template/gitbook/en/started.md rename to template/docs/started.md index 5ad2ba2..b105793 100644 --- a/template/gitbook/en/started.md +++ b/template/docs/started.md @@ -3,7 +3,7 @@ > We will be using [ES2015](https://github.com/lukehoban/es6features) in the code samples in the guide. -### HTML +## HTML ```html @@ -14,7 +14,7 @@ ``` -### JavaScript +## JavaScript ```javascript // If using a module system (e.g. via vue-cli), import Vue and {{ classify name }} and then call Vue.use({{ classify name }}). diff --git a/template/gitbook/LANGS.md b/template/gitbook/LANGS.md deleted file mode 100644 index 25b60e8..0000000 --- a/template/gitbook/LANGS.md +++ /dev/null @@ -1 +0,0 @@ -* [English](en/) diff --git a/template/gitbook/book.json b/template/gitbook/book.json deleted file mode 100644 index 606af2b..0000000 --- a/template/gitbook/book.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "gitbook": "3.x.x", - "root": "./", - "plugins": ["edit-link", "theme-vuejs@git+https://github.com/pearofducks/gitbook-plugin-theme-vuejs.git", "-fontsettings", "github", "advanced-emoji@0.2.1"], - "pluginsConfig": { - {{#unless_eq githubAccount ""}} - "edit-link": { - "base": "https://github.com/{{ githubAccount }}/{{ name }}/tree/{{ branch }}/gitbook", - "label": "Edit This Page" - }, - "github": { - "url": "https://github.com/{{ githubAccount }}/{{ name }}/" - } - {{/unless_eq}} - }, - "links": { - "sharing": { - "facebook": false, - "twitter": false - } - } -} diff --git a/template/gitbook/en/README.md b/template/gitbook/en/README.md deleted file mode 120000 index 0fbb5a8..0000000 --- a/template/gitbook/en/README.md +++ /dev/null @@ -1 +0,0 @@ -SUMMARY.md \ No newline at end of file diff --git a/template/gitbook/en/SUMMARY.md b/template/gitbook/en/SUMMARY.md deleted file mode 100644 index a08467c..0000000 --- a/template/gitbook/en/SUMMARY.md +++ /dev/null @@ -1,10 +0,0 @@ -# {{ name }} documentation - -> {{ description }} - -{{#unless_eq githubAccount ""}} -**[CHANGELOG](https://github.com/{{ githubAccount }}/{{ name }}/blob/{{ branch }}/CHANGELOG.md)** -{{/unless_eq}} - -- [Installation](installation.md) -- [Getting Started](started.md) diff --git a/template/package.json b/template/package.json index 6a11d03..27a9c2f 100644 --- a/template/package.json +++ b/template/package.json @@ -31,9 +31,6 @@ "eslint-plugin-vue-libs": "^2.0.1", "eslint-plugin-typescript": "^0.12.0", "eslint-loader": "^2.0.0", - {{#gitbook}} - "gitbook-cli": "^2.3.0", - {{/gitbook}} "mocha": "^4.1.0", "mocha-loader": "^1.1.1", "karma": "^2.0.2", @@ -74,6 +71,9 @@ "vue": "^2.5.16", "vue-template-compiler": "^2.5.16", "@vue/test-utils": "^1.0.0-beta.16", + {{#docs}} + "vuepress": "^0.10.0", + {{/docs}} "webpack": "^4.9.1", "webpack-serve": "^1.0.2" }, @@ -119,11 +119,10 @@ "coverage": "cat ./coverage/lcov.info", {{/if_eq}} "dev": "cross-env BABEL_ENV=test webpack-serve --hot --open --content ./test/unit/ --config config/webpack.dev.conf.js", - {{#gitbook}} - "docs": "gitbook serve ./gitbook ./docs", - "docs:build": "node config/version.js && gitbook build ./gitbook ./docs", - "docs:install": "gitbook install ./gitbook", - {{/gitbook}} + {{#docs}} + "docs:dev": "vuepress dev docs", + "docs:build": "node config/version.js && vuepress build docs", + {{/docs}} "lint": "eslint --fix --ext .ts src test", {{#sauce}} "sauce": "npm run sauce:coolkids && npm run sauce:ie && npm run sauce:mobile",