Skip to content

Commit 35edd63

Browse files
committed
Migrate from gitbook to vuepress
1 parent 2a97ec2 commit 35edd63

File tree

5 files changed

+124
-86
lines changed

5 files changed

+124
-86
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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function run(bin, args, done) {
4444
return new Promise(function(resolve, reject) {
4545
var exe = '"' + process.execPath + '"';
4646
var src = require.resolve(bin);
47-
var ps = exec([exe, src].concat(args || []).join(' '));
47+
var ps = exec([exe, src].concat(args || []).join(' '), { cwd: '.' });
4848

4949
ps.stdout.pipe(process.stdout);
5050
ps.stderr.pipe(process.stderr);
@@ -134,12 +134,11 @@ function lintHtmlTask() {
134134
}));
135135
}
136136

137-
function docsTask() {
138-
var bin = 'gitbook-cli/bin/gitbook.js';
139-
var cmd = argv.watch ? 'serve' : 'build';
137+
function docsTask(done) {
138+
var bin = 'vuepress/bin/vuepress.js';
139+
var cmd = argv.watch ? 'dev' : 'build';
140140

141-
return run(bin, ['install', './'])
142-
.then(() => run(bin, [cmd, './', './dist/docs']));
141+
return run(bin, [cmd, 'docs']);
143142
}
144143

145144
function unittestTask(done) {

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
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
"coveralls": "^3.0.0",
2731
"eslint": "^5.9.0",
2832
"eslint-config-chartjs": "^0.1.0",
2933
"eslint-plugin-html": "^5.0.0",
30-
"gitbook-cli": "^2.3.2",
3134
"gulp": "^4.0.0",
3235
"gulp-eslint": "^5.0.0",
3336
"gulp-file": "^0.4.0",
@@ -54,6 +57,7 @@
5457
"rollup-plugin-istanbul": "^2.0.1",
5558
"rollup-plugin-node-resolve": "^3.4.0",
5659
"rollup-plugin-terser": "^3.0.0",
60+
"vuepress": "^0.14.5",
5761
"watchify": "^3.9.0",
5862
"yargs": "^12.0.5"
5963
},

0 commit comments

Comments
 (0)