Skip to content

Commit d824d6d

Browse files
committed
Refactor build logic; Update README
1 parent dd99fc2 commit d824d6d

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Introduction
44
A simple timeline component similar to [Ant Timeline](https://www.antdv.com/components/timeline/) based on [Bootstrap-Vue](https://bootstrap-vue.org/).
55

6+
**Note**: This component assumes you use [Bootstrap-Vue (v4)](https://bootstrap-vue.org/) in your project and have installed [the dependencies](https://bootstrap-vue.org/docs).
7+
68
## Demo
79

810
Link: TBD
@@ -12,7 +14,8 @@ Link: TBD
1214
```bash
1315
npm i bootstrap-vue-timeline
1416

15-
# or:
17+
# if you use yarn:
18+
1619
yarn add bootstrap-vue-timeline
1720
```
1821

@@ -21,9 +24,17 @@ yarn add bootstrap-vue-timeline
2124
```html
2225
<script>
2326
import Vue from 'vue';
24-
import BootstrapVueTimeline from '@/bootstrap-vue-timeline.vue';
27+
import BootstrapVueTimeline from 'bootstrap-vue-timeline'
2528
import { BCard } from 'bootstrap-vue'
2629
Vue.component('b-card', BCard)
30+
Vue.component('b-timeline', BootstrapVueTimeline)
31+
32+
// Uncomment the following to import BootstrapVue CSS files if you
33+
// have not done so when registering BootstrapVue. Order is important.
34+
// Check out: https://bootstrap-vue.org/docs#using-module-bundlers
35+
// import 'bootstrap/dist/css/bootstrap.min.css'
36+
// import 'bootstrap-vue/dist/bootstrap-vue.css'
37+
2738
2839
export default Vue.extend({
2940
name: 'ServeDev',
@@ -61,7 +72,7 @@ export default Vue.extend({
6172
<b-card
6273
title="Event Timeline"
6374
>
64-
<bootstrap-vue-timeline
75+
<b-timeline
6576
:items="timelineItems"
6677
/>
6778
</b-card>
@@ -91,6 +102,11 @@ TBD
91102
yarn install --dev
92103
```
93104

105+
**Build component**:
106+
```bash
107+
yarn build
108+
```
109+
94110
**Run example app locally**:
95111
```bash
96112
yarn serve

dev/serve.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import BootstrapVueTimeline from '@/bootstrap-vue-timeline.vue';
44
import { BCard } from 'bootstrap-vue'
55
Vue.component('b-card', BCard)
66
7+
import 'bootstrap/dist/css/bootstrap.min.css'
8+
import 'bootstrap-vue/dist/bootstrap-vue.css'
9+
710
export default Vue.extend({
811
name: 'ServeDev',
912
components: {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
},
6060
"standard": {
6161
"ignore": [
62-
"*.config.js"
62+
"*.config.js",
63+
"dist/"
6364
]
6465
}
6566
}

src/bootstrap-vue-timeline.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ Vue.component('b-list-group', BListGroup)
77
Vue.component('b-list-group-item', BListGroupItem)
88
Vue.component('b-tooltip', BTooltip)
99
10-
import 'bootstrap/dist/css/bootstrap.min.css'
11-
import 'bootstrap-vue/dist/bootstrap-vue.css'
12-
1310
export default /*#__PURE__*/{
1411
name: 'BootstrapVueTimeline', // vue component name
1512
props: {

0 commit comments

Comments
 (0)