Skip to content

Commit 8bb38d9

Browse files
committed
Merge branch 'master' into next
2 parents 536a4a8 + 181618c commit 8bb38d9

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

README.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,36 @@ A lightweight playground for live editing VueJs code in the browser
1010

1111
## Usage
1212

13+
Install the dependency:
14+
15+
`npm install --save vue-live`
16+
1317
The simplest way to render components is as a VueJs template:
1418

1519
```vue
1620
<template>
17-
<VueLive :code="`<date-picker />`" :components="{ DatePicker }" @error="(e) => handleError(e)">
21+
<VueLive
22+
:code="`<date-picker />`"
23+
:components="{ DatePicker }"
24+
@error="(e) => handleError(e)"
25+
/>
1826
</template>
1927
2028
<script>
2129
import { VueLive } from "vue-live";
2230
// import the css separately for easier SSR
23-
import "vue-live/lib/vue-live.esm.css"
24-
import DatePicker from "vuejs-datepicker"
31+
import "vue-live/lib/vue-live.esm.css";
32+
import DatePicker from "vuejs-datepicker";
2533
2634
export default {
27-
components: { VueLive },
28-
data(){
29-
return {
30-
// make DatePicker available in template
31-
DatePicker
32-
}
33-
}
34-
}
35+
components: { VueLive },
36+
data() {
37+
return {
38+
// make DatePicker available in template
39+
DatePicker,
40+
};
41+
},
42+
};
3543
</script>
3644
```
3745

@@ -57,22 +65,20 @@ module.exports = {
5765
};
5866
```
5967

60-
in [vue.config.js](https://cli.vuejs.org/guide/webpack.html)
61-
68+
In a [Vue CLI](https://cli.vuejs.org/) project use [vue.config.js](https://cli.vuejs.org/guide/webpack.html).
6269

6370
```js
6471
module.exports = {
65-
configureWebpack: {
66-
resolve:{
67-
alias:{
68-
vue$: "vue/dist/vue.esm-browser.js",
69-
}
70-
}
71-
}
72-
}
72+
configureWebpack: {
73+
resolve: {
74+
alias: {
75+
vue$: "vue/dist/vue.esm.js",
76+
},
77+
},
78+
},
79+
};
7380
```
7481

75-
7682
in [nuxt.config.js](https://nuxtjs.org/faq/extend-webpack/)
7783

7884
```js

0 commit comments

Comments
 (0)