Skip to content

Commit 75b1c0a

Browse files
committed
Migrate from gitbook to vuepress
1 parent f6d9a39 commit 75b1c0a

File tree

6 files changed

+122
-88
lines changed

6 files changed

+122
-88
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "6"
3+
- "8"
44

55
before_install:
66
- "export CHROME_BIN=/usr/bin/google-chrome"

book.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/.vuepress/config.js

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
module.exports = {
2+
title: 'Chart.js documentation',
3+
dest: './dist',
4+
ga: 'UA-28909194-3',
5+
head: [
6+
['link', { rel: 'icon', href: `/favicon.ico` }],
7+
],
8+
themeConfig: {
9+
repo: 'chartjs/Chart.js',
10+
lastUpdated: 'Last Updated',
11+
editLinks: true,
12+
docsDir: 'docs',
13+
nav: [
14+
{ text: 'Home', link: '/' },
15+
{ text: 'Guide', link: '/docs/' },
16+
{ text: 'Samples', link: '/samples/' }
17+
],
18+
sidebar: [
19+
{
20+
title: 'Getting Started',
21+
collapsable: false,
22+
children: [
23+
'/getting-started/',
24+
'/getting-started/installation',
25+
'/getting-started/integration'
26+
]
27+
},
28+
{
29+
title: 'General',
30+
collapsable: false,
31+
children: [
32+
'/general/',
33+
'/general/accessibility',
34+
'/general/responsive',
35+
'/general/device-pixel-ratio',
36+
'/general/interactions/',
37+
'/general/interactions/events',
38+
'/general/interactions/modes',
39+
'/general/options',
40+
'/general/colors',
41+
'/general/fonts'
42+
]
43+
},
44+
{
45+
title: 'Configuration',
46+
collapsable: false,
47+
children: [
48+
'/configuration/',
49+
'/configuration/animations',
50+
'/configuration/layout',
51+
'/configuration/legend',
52+
'/configuration/title',
53+
'/configuration/tooltip',
54+
'/configuration/elements'
55+
]
56+
},
57+
{
58+
title: 'Charts',
59+
collapsable: false,
60+
children: [
61+
'/charts/',
62+
'/charts/line',
63+
'/charts/bar',
64+
'/charts/radar',
65+
'/charts/doughnut',
66+
'/charts/polar',
67+
'/charts/bubble',
68+
'/charts/scatter',
69+
'/charts/area',
70+
'/charts/mixed'
71+
]
72+
},
73+
{
74+
title: 'Axes',
75+
collapsable: false,
76+
children: [
77+
'/axes/',
78+
'/axes/cartesian/',
79+
'/axes/cartesian/category',
80+
'/axes/cartesian/linear',
81+
'/axes/cartesian/logarithmic',
82+
'/axes/cartesian/time',
83+
'/axes/radial/',
84+
'/axes/radial/linear',
85+
'/axes/labelling',
86+
'/axes/styling'
87+
]
88+
},
89+
{
90+
title: 'Developers',
91+
collapsable: false,
92+
children: [
93+
'/developers/',
94+
'/developers/api',
95+
'/developers/updates',
96+
'/developers/plugins',
97+
'/developers/charts',
98+
'/developers/axes',
99+
'/developers/contributing'
100+
]
101+
},
102+
{
103+
title: 'Additional Notes',
104+
collapsable: false,
105+
children: [
106+
'/notes/',
107+
'/notes/comparison',
108+
'/notes/extensions',
109+
'/notes/license'
110+
]
111+
}
112+
]
113+
}
114+
}

docs/SUMMARY.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

gulpfile.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,7 @@ function lintHtmlTask() {
186186
}
187187

188188
function docsTask(done) {
189-
var script = require.resolve('gitbook-cli/bin/gitbook.js');
190-
var cmd = '"' + process.execPath + '"';
191-
192-
exec([cmd, script, 'install', './'].join(' ')).then(() => {
193-
return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' '));
194-
}).then(() => {
189+
exec('npm run docs:build').then(() => {
195190
done();
196191
}).catch((err) => {
197192
done(new Error(err.stdout || err));

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"type": "git",
1010
"url": "https://github.com/chartjs/Chart.js.git"
1111
},
12+
"scripts": {
13+
"docs:dev": "vuepress dev docs",
14+
"docs:build": "vuepress build docs"
15+
},
1216
"devDependencies": {
1317
"browserify": "^16.2.3",
1418
"browserify-istanbul": "^3.0.1",
@@ -18,7 +22,6 @@
1822
"eslint": "^5.9.0",
1923
"eslint-config-chartjs": "^0.1.0",
2024
"eslint-plugin-html": "^5.0.0",
21-
"gitbook-cli": "^2.3.2",
2225
"gulp": "^4.0.0",
2326
"gulp-concat": "^2.6.0",
2427
"gulp-connect": "^5.6.1",
@@ -35,7 +38,7 @@
3538
"jasmine": "^3.3.0",
3639
"jasmine-core": "^3.3.0",
3740
"karma": "^3.1.1",
38-
"karma-browserify": "^5.1.1",
41+
"karma-browserify": "^5.3.0",
3942
"karma-chrome-launcher": "^2.2.0",
4043
"karma-coverage": "^1.1.1",
4144
"karma-firefox-launcher": "^1.0.1",
@@ -44,6 +47,7 @@
4447
"merge-stream": "^1.0.1",
4548
"pixelmatch": "^4.0.2",
4649
"vinyl-source-stream": "^2.0.0",
50+
"vuepress": "^0.14.5",
4751
"watchify": "^3.9.0",
4852
"yargs": "^12.0.2"
4953
},

0 commit comments

Comments
 (0)