Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit e4151a8

Browse files
feat: add bootstrap-vue integration
1 parent fb39683 commit e4151a8

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# vue-webpack-boilerplate
22

33
> A full-featured Webpack setup with hot-reload, lint-on-save, unit testing & css extraction.
4-
5-
> This template is Vue 2.0 compatible. For Vue 1.x use this command: `vue init webpack#1.0 my-project`
4+
> This template is Vue 2.0 compatible.
65
76
## Documentation
87

@@ -11,14 +10,14 @@
1110

1211
## Usage
1312

14-
This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). **It is recommended to use npm 3+ for a more efficient dependency tree.**
13+
This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). **It is recommended to use npm 5+ for a more reliable install.**
1514

16-
``` bash
17-
$ npm install -g vue-cli
18-
$ vue init webpack my-project
19-
$ cd my-project
20-
$ npm install
21-
$ npm run dev
15+
```bash
16+
npm install -g vue-cli
17+
vue init bootstrap-vue/webpack my-project
18+
cd my-project
19+
npm install
20+
npm run dev
2221
```
2322

2423
If port 8080 is already in use on your machine you must change the port number in `/config/index.js`. Otherwise `npm run dev` will fail.

template/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
"lint": "eslint --ext .js,.vue src{{#unit}} test/unit/specs{{/unit}}{{#e2e}} test/e2e/specs{{/e2e}}"{{/lint}}
1515
},
1616
"dependencies": {
17-
"vue": "^2.4.2"{{#router}},
18-
"vue-router": "^2.7.0"{{/router}}
17+
"vue": "^2.4.4",
18+
{{#router}}
19+
"vue-router": "^2.7.0",
20+
{{/router}}
21+
"bootstrap": "^4.0.0-beta",
22+
"bootstrap-vue": "^1.0.0-beta.9",
23+
"popper.js": "^1.12.5"
1924
},
2025
"devDependencies": {
2126
"autoprefixer": "^7.1.2",

template/src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
44
{{/if_eq}}
55
import Vue from 'vue'{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
6+
import BootstrapVue from "bootstrap-vue"{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
67
import App from './App'{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
78
{{#router}}
89
import router from './router'{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
910
{{/router}}
11+
import "bootstrap/dist/css/bootstrap.min.css"{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
12+
import "bootstrap-vue/dist/bootstrap-vue.css"{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
1013

14+
Vue.use(BootstrapVue){{#if_eq lintConfig "airbnb"}};{{/if_eq}}
1115
Vue.config.productionTip = false{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
1216

1317
/* eslint-disable no-new */

0 commit comments

Comments
 (0)