Skip to content

Commit d3f7058

Browse files
committed
πŸ“ Update README and docs
1 parent 6bdda62 commit d3f7058

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,29 @@ export default Line.extend({
176176
})
177177
```
178178

179+
## Webpack & Bundling tools
180+
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
181+
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.
182+
183+
However if you have problems o you can import the dist file
184+
185+
```
186+
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
187+
// or
188+
import { Line } from 'vue-chartjs/dist/vue-chartjs'
189+
```
190+
191+
Or you can set an alias.
192+
193+
### Browserify
194+
195+
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:
196+
197+
```
198+
{
199+
"presets": ["es2015"]
200+
}
201+
```
179202
## Available Charts
180203

181204
### Bar Chart

β€Ždocs/README.mdβ€Ž

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,27 @@ Sometimes you need more control over chart.js. Thats why you can access the char
278278
### Bubble
279279

280280
![Bubble](assets/bubble.png)
281+
282+
## Webpack & Bundling tools
283+
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
284+
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.
285+
286+
However if you have problems o you can import the dist file
287+
288+
```
289+
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
290+
// or
291+
import { Line } from 'vue-chartjs/dist/vue-chartjs'
292+
```
293+
294+
Or you can set an alias.
295+
296+
### Browserify
297+
298+
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:
299+
300+
```
301+
{
302+
"presets": ["es2015"]
303+
}
304+
```

0 commit comments

Comments
Β (0)