Skip to content

Commit

Permalink
Migrate from gitbook to vuepress
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 20, 2018
1 parent f6d9a39 commit 0c03651
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "6"
- "8"

before_install:
- "export CHROME_BIN=/usr/bin/google-chrome"
Expand Down
24 changes: 0 additions & 24 deletions book.json

This file was deleted.

110 changes: 110 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
module.exports = {
title: 'Chart.js documentation',
dest: './dist',
themeConfig: {
repo: 'chartjs/Chart.js',
lastUpdated: 'Last Updated',
editLinks: true,
docsDir: 'docs',
nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/docs/' },
{ text: 'Samples', link: '/samples/' }
],
sidebar: [
{
title: 'Getting Started',
collapsable: false,
children: [
'/getting-started/',
'/getting-started/installation',
'/getting-started/integration'
]
},
{
title: 'General',
collapsable: false,
children: [
'/general/',
'/general/accessibility',
'/general/responsive',
'/general/device-pixel-ratio',
'/general/interactions/',
'/general/interactions/events',
'/general/interactions/modes',
'/general/options',
'/general/colors',
'/general/fonts'
]
},
{
title: 'Configuration',
collapsable: false,
children: [
'/configuration/',
'/configuration/animations',
'/configuration/layout',
'/configuration/legend',
'/configuration/title',
'/configuration/tooltip',
'/configuration/elements'
]
},
{
title: 'Charts',
collapsable: false,
children: [
'/charts/',
'/charts/line',
'/charts/bar',
'/charts/radar',
'/charts/doughnut',
'/charts/polar',
'/charts/bubble',
'/charts/scatter',
'/charts/area',
'/charts/mixed'
]
},
{
title: 'Axes',
collapsable: false,
children: [
'/axes/',
'/axes/cartesian/',
'/axes/cartesian/category',
'/axes/cartesian/linear',
'/axes/cartesian/logarithmic',
'/axes/cartesian/time',
'/axes/radial/',
'/axes/radial/linear',
'/axes/labelling',
'/axes/styling'
]
},
{
title: 'Developers',
collapsable: false,
children: [
'/developers/',
'/developers/api',
'/developers/updates',
'/developers/plugins',
'/developers/charts',
'/developers/axes',
'/developers/contributing'
]
},
{
title: 'Additional Notes',
collapsable: false,
children: [
'/notes/',
'/notes/comparison',
'/notes/extensions',
'/notes/license'
]
}
]
}
}
55 changes: 0 additions & 55 deletions docs/SUMMARY.md

This file was deleted.

7 changes: 1 addition & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,7 @@ function lintHtmlTask() {
}

function docsTask(done) {
var script = require.resolve('gitbook-cli/bin/gitbook.js');
var cmd = '"' + process.execPath + '"';

exec([cmd, script, 'install', './'].join(' ')).then(() => {
return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' '));
}).then(() => {
exec('npm run docs:build').then(() => {
done();
}).catch((err) => {
done(new Error(err.stdout || err));
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"type": "git",
"url": "https://github.com/chartjs/Chart.js.git"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"devDependencies": {
"browserify": "^16.2.3",
"browserify-istanbul": "^3.0.1",
Expand All @@ -18,7 +22,6 @@
"eslint": "^5.9.0",
"eslint-config-chartjs": "^0.1.0",
"eslint-plugin-html": "^5.0.0",
"gitbook-cli": "^2.3.2",
"gulp": "^4.0.0",
"gulp-concat": "^2.6.0",
"gulp-connect": "^5.6.1",
Expand All @@ -35,7 +38,7 @@
"jasmine": "^3.3.0",
"jasmine-core": "^3.3.0",
"karma": "^3.1.1",
"karma-browserify": "^5.1.1",
"karma-browserify": "^5.3.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
Expand All @@ -44,6 +47,7 @@
"merge-stream": "^1.0.1",
"pixelmatch": "^4.0.2",
"vinyl-source-stream": "^2.0.0",
"vuepress": "^0.14.5",
"watchify": "^3.9.0",
"yargs": "^12.0.2"
},
Expand Down

0 comments on commit 0c03651

Please sign in to comment.