Skip to content

Commit ba98cbb

Browse files
committed
Migrate from gitbook to vuepress
1 parent 3cb2d70 commit ba98cbb

File tree

5 files changed

+121
-87
lines changed

5 files changed

+121
-87
lines changed

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
@@ -181,12 +181,7 @@ function lintHtmlTask() {
181181
}
182182

183183
function docsTask(done) {
184-
var script = require.resolve('gitbook-cli/bin/gitbook.js');
185-
var cmd = '"' + process.execPath + '"';
186-
187-
exec([cmd, script, 'install', './'].join(' ')).then(() => {
188-
return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' '));
189-
}).then(() => {
184+
exec('npm run docs:build').then(() => {
190185
done();
191186
}).catch((err) => {
192187
done(new Error(err.stdout || err));

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"bugs": {
2323
"url": "https://github.com/chartjs/Chart.js/issues"
2424
},
25+
"scripts": {
26+
"docs:dev": "vuepress dev docs",
27+
"docs:build": "vuepress build docs"
28+
},
2529
"devDependencies": {
2630
"browserify": "^16.2.3",
2731
"browserify-istanbul": "^3.0.1",
@@ -31,7 +35,6 @@
3135
"eslint": "^5.9.0",
3236
"eslint-config-chartjs": "^0.1.0",
3337
"eslint-plugin-html": "^5.0.0",
34-
"gitbook-cli": "^2.3.2",
3538
"gulp": "^4.0.0",
3639
"gulp-concat": "^2.6.0",
3740
"gulp-eslint": "^5.0.0",
@@ -47,7 +50,7 @@
4750
"jasmine": "^3.3.0",
4851
"jasmine-core": "^3.3.0",
4952
"karma": "^3.1.1",
50-
"karma-browserify": "^5.1.1",
53+
"karma-browserify": "^5.3.0",
5154
"karma-chrome-launcher": "^2.2.0",
5255
"karma-coverage": "^1.1.1",
5356
"karma-firefox-launcher": "^1.0.1",
@@ -56,6 +59,7 @@
5659
"merge-stream": "^1.0.1",
5760
"pixelmatch": "^4.0.2",
5861
"vinyl-source-stream": "^2.0.0",
62+
"vuepress": "^0.14.5",
5963
"watchify": "^3.9.0",
6064
"yargs": "^12.0.5"
6165
},

0 commit comments

Comments
 (0)