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

Commit

Permalink
💥 breaking(docs): switch to vuepress from gitbook
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 28, 2018
1 parent 616b34e commit 435432f
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 59 deletions.
9 changes: 4 additions & 5 deletions meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ module.exports = {
{ name: 'jshint', value: 'jshint' }
]
},
gitbook: {
docs: {
type: 'confirm',
message: 'Setup gitbook documentaion?'
message: 'Setup documentaion?'
},
issue: {
type: 'confirm',
Expand All @@ -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"
},
Expand Down
29 changes: 29 additions & 0 deletions template/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -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',
]
}
}
}
}

10 changes: 10 additions & 0 deletions template/docs/README.md
Original file line number Diff line number Diff line change
@@ -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).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

### Direct Download / CDN
## Direct Download / CDN

https://unpkg.com/{{ name }}/dist/{{ name }}

Expand All @@ -13,13 +13,17 @@ Include {{ name }} after Vue and it will install itself automatically:
<script src="https://unpkg.com/{{ name }}/dist/{{ name }}.js"></script>
```

### 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()`:

Expand All @@ -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}}
4 changes: 2 additions & 2 deletions template/gitbook/en/started.md → template/docs/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> We will be using [ES2015](https://github.com/lukehoban/es6features) in the code samples in the guide.

### HTML
## HTML

```html
<script src="https://unpkg.com/vue/dist/vue.js"></script>
Expand All @@ -14,7 +14,7 @@
</div>
```

### 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 }}).
Expand Down
1 change: 0 additions & 1 deletion template/gitbook/LANGS.md

This file was deleted.

22 changes: 0 additions & 22 deletions template/gitbook/book.json

This file was deleted.

1 change: 0 additions & 1 deletion template/gitbook/en/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions template/gitbook/en/SUMMARY.md

This file was deleted.

15 changes: 7 additions & 8 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 435432f

Please sign in to comment.