From d3f70586852b6031847ab31afa5fb393de881aa7 Mon Sep 17 00:00:00 2001 From: Jakub Juszczak Date: Fri, 3 Mar 2017 16:00:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20README=20and=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 +++++++++++++++++++++++ docs/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/README.md b/README.md index 0c74e90..9ed1d62 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,29 @@ export default Line.extend({ }) ``` +## Webpack & Bundling tools +There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled. +If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it. + +However if you have problems o you can import the dist file + +``` +import VueCharts from 'vue-chartjs/dist/vue-chartjs' +// or +import { Line } from 'vue-chartjs/dist/vue-chartjs' +``` + +Or you can set an alias. + +### Browserify + +In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code: + +``` +{ +"presets": ["es2015"] +} +``` ## Available Charts ### Bar Chart diff --git a/docs/README.md b/docs/README.md index ad6d42f..9ace703 100644 --- a/docs/README.md +++ b/docs/README.md @@ -278,3 +278,27 @@ Sometimes you need more control over chart.js. Thats why you can access the char ### Bubble ![Bubble](assets/bubble.png) + +## Webpack & Bundling tools +There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled. +If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it. + +However if you have problems o you can import the dist file + +``` +import VueCharts from 'vue-chartjs/dist/vue-chartjs' +// or +import { Line } from 'vue-chartjs/dist/vue-chartjs' +``` + +Or you can set an alias. + +### Browserify + +In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code: + +``` +{ +"presets": ["es2015"] +} +```