Skip to content

Migrate from gitbook to vuepress #5847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions book.json

This file was deleted.

114 changes: 114 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
module.exports = {
title: 'Chart.js documentation',
dest: './dist',
ga: 'UA-28909194-3',
head: [
['link', { rel: 'icon', href: `/favicon.ico` }],
],
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.

11 changes: 5 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function run(bin, args, done) {
return new Promise(function(resolve, reject) {
var exe = '"' + process.execPath + '"';
var src = require.resolve(bin);
var ps = exec([exe, src].concat(args || []).join(' '));
var ps = exec([exe, src].concat(args || []).join(' '), { cwd: '.' });

ps.stdout.pipe(process.stdout);
ps.stderr.pipe(process.stderr);
Expand Down Expand Up @@ -134,12 +134,11 @@ function lintHtmlTask() {
}));
}

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

return run(bin, ['install', './'])
.then(() => run(bin, [cmd, './', './dist/docs']));
return run(bin, [cmd, 'docs']);
}

function unittestTask(done) {
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
"bugs": {
"url": "https://github.com/chartjs/Chart.js/issues"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"devDependencies": {
"coveralls": "^3.0.0",
"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-eslint": "^5.0.0",
"gulp-file": "^0.4.0",
Expand All @@ -54,6 +57,7 @@
"rollup-plugin-istanbul": "^2.0.1",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-terser": "^3.0.0",
"vuepress": "^0.14.5",
"watchify": "^3.9.0",
"yargs": "^12.0.5"
},
Expand Down