Skip to content

Commit 9463138

Browse files
jacobmllr95tmorehouse
authored andcommitted
feat(docs): Prettify with prettier (#2427)
1 parent c15f522 commit 9463138

File tree

55 files changed

+7332
-6297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7332
-6297
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"proseWrap": "always",
4+
"semi": false,
5+
"singleQuote": true,
6+
"tabWidth": 2
7+
}

CHANGELOG.md

Lines changed: 1566 additions & 670 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,74 @@
33
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
44

55
## Playground & Issue Reports
6+
67
If you want to play with BootstrapVue components without any local setup just head to
7-
[OnlinePlayground](https://bootstrap-vue.js.org/play) and you can interactively play and test components with a fresh Vue instance.
8-
If you want to keep your changes or make PRs reporting a component's misbehaviour you can save them in JSFiddle and provide that link in issues.
8+
[OnlinePlayground](https://bootstrap-vue.js.org/play) and you can interactively play and test
9+
components with a fresh Vue instance. If you want to keep your changes or make PRs reporting a
10+
component's misbehaviour you can save them in JSFiddle and provide that link in issues.
911

1012
## Setup
13+
1114
- Clone this repo (`git clone https://github.com/bootstrap-vue/bootstrap-vue --branch=dev`)
1215
- Make sure you have node & yarn installed locally.
1316
- `cd bootstrap-vue`
1417
- Run `yarn install` to get all dependencies installed.
1518

1619
## Work on components
20+
1721
If you want to hack and improve components locally, you can follow these steps:
1822

1923
- Run `yarn docs-dev` to run a local development server.
2024
- Head to `http://localhost:3000/play`.
21-
- Now you can locally make changes to components (they are located in the `components` directory).
25+
- Now you can locally make changes to components (they are located in the `components` directory).
2226
Changes will be applied with webpack hot-reloading without needing to reload the page.
2327
- Finally feel free to share your awesome hacks with others and opening a PR.
2428

2529
## Test inside your project
30+
2631
If you want to see your changes in your project instead of the playground:
2732

28-
- Execute `yarn link` inside *bootstrap-vue* directory.
33+
- Execute `yarn link` inside _bootstrap-vue_ directory.
2934
- In your project run `yarn link bootstrap-vue`
30-
- Run `yarn watch` inside *bootstrap-vue*
31-
- Now every time you change a component, a new production version will be built and ready on your project.
35+
- Run `yarn watch` inside _bootstrap-vue_
36+
- Now every time you change a component, a new production version will be built and ready on your
37+
project.
3238

3339
## Pull requests
34-
Please ensure all pull requests are made aganst the `dev` branch on GitHub. See
35-
the [Conventional Commits](https://conventionalcommits.org/) spec for commit
36-
and PR naming guidelines. This is very important, as the `CHANGELOG` is
37-
generated from these messages.
40+
41+
Please ensure all pull requests are made aganst the `dev` branch on GitHub. See the
42+
[Conventional Commits](https://conventionalcommits.org/) spec for commit and PR naming guidelines.
43+
This is very important, as the `CHANGELOG` is generated from these messages.
3844

3945
Examples:
4046

41-
* `fix(modal): fixes some broken modal stuff`
42-
* `feat(table): add a feature to the table compoment!`
47+
- `fix(modal): fixes some broken modal stuff`
48+
- `feat(table): add a feature to the table compoment!`
4349

4450
## Financial contributions
4551

46-
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/bootstrap-vue).
47-
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
48-
52+
We also welcome financial contributions in full transparency on our
53+
[open collective](https://opencollective.com/bootstrap-vue). Anyone can file an expense. If the
54+
expense makes sense for the development of the community, it will be "merged" in the ledger of our
55+
open collective by the core contributors and the person who filed the expense will be reimbursed.
4956

5057
## Credits
5158

52-
5359
### Contributors
5460

5561
Thank you to all the people who have already contributed to bootstrap-vue!
5662
<a href="https://github.com/bootstrap-vue/bootstrap-vue/graphs/contributors"><img src="https://opencollective.com/bootstrap-vue/contributors.svg?width=890" class="img-fluid"></a>
5763

58-
5964
### Backers
6065

6166
Thank you to all our backers! [[Become a backer](https://opencollective.com/bootstrap-vue#backer)]
6267

6368
<a href="https://opencollective.com/bootstrap-vue#backers" target="_blank"><img src="https://opencollective.com/bootstrap-vue/backers.svg?width=890" class="img-fluid"></a>
6469

65-
6670
### Sponsors
6771

68-
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/bootstrap-vue#sponsor))
72+
Thank you to all our sponsors! (please ask your company to also support this open source project by
73+
[becoming a sponsor](https://opencollective.com/bootstrap-vue#sponsor))
6974

7075
<a href="https://opencollective.com/bootstrap-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/bootstrap-vue/sponsor/0/avatar.svg"></a>
7176
<a href="https://opencollective.com/bootstrap-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/bootstrap-vue/sponsor/1/avatar.svg"></a>

docs/markdown/intro/README.md

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
## General
44

5-
If you are using module bundlers like [webpack](https://webpack.js.org/), [rollup.js](https://rollupjs.org),
6-
etc you may prefer to directly include the package into your project. To get started, use
7-
`yarn` or `npm` to get the latest version of Vue, BootstrapVue and Bootstrap 4:
5+
If you are using module bundlers like [webpack](https://webpack.js.org/),
6+
[rollup.js](https://rollupjs.org), etc you may prefer to directly include the package into your
7+
project. To get started, use `yarn` or `npm` to get the latest version of Vue, BootstrapVue and
8+
Bootstrap 4:
89

910
```bash
1011
# With npm
@@ -36,22 +37,21 @@ Or import Bootstrap and BootstrapVue `scss` files via a custom SCSS file:
3637

3738
```scss
3839
// custom.scss
39-
@import "node_modules/bootstrap/scss/bootstrap";
40-
@import "node_modules/bootstrap-vue/src/index.scss";
40+
@import 'node_modules/bootstrap/scss/bootstrap';
41+
@import 'node_modules/bootstrap-vue/src/index.scss';
4142
```
4243

4344
```js
4445
// app.js
4546
import 'custom.scss'
4647
```
4748

48-
Be sure to include your custom variables before `bootstrap.scss` and include BootstrapVue
49-
SCSS _after_ Bootstrap SCSS to ensure variables are set up correctly.
49+
Be sure to include your custom variables before `bootstrap.scss` and include BootstrapVue SCSS
50+
_after_ Bootstrap SCSS to ensure variables are set up correctly.
5051

5152
**Note**: _Requires webpack configuration to load CSS/SCSS files
5253
([official guide](https://webpack.js.org/guides/asset-management/#loading-css))_.
5354

54-
5555
## Nuxt.js plugin module
5656

5757
Install dependencies:
@@ -74,20 +74,17 @@ This will include both `boostrap.css` and `bootstrap-vue.css` default CSS.
7474
}
7575
```
7676

77-
If you are using custom Bootstrap SCSS, you can disable automatic inclusion of Bootstrap
78-
and BootstrapVue pre-compiled CSS files by setting the folliwing option(s) to `false`:
77+
If you are using custom Bootstrap SCSS, you can disable automatic inclusion of Bootstrap and
78+
BootstrapVue pre-compiled CSS files by setting the folliwing option(s) to `false`:
7979

8080
```js
8181
{
82-
modules: [
83-
['bootstrap-vue/nuxt', { bootstrapCss: false, bootstrapVueCss: false }],
84-
]
82+
modules: [['bootstrap-vue/nuxt', { bootstrapCss: false, bootstrapVueCss: false }]]
8583
}
86-
8784
```
8885

89-
BootstrapVue's custom CSS relies on some Boostrap SCSS variables. You can include Bootstrap
90-
and BootstrapVue SCSS in your project's custom SCSS file:
86+
BootstrapVue's custom CSS relies on some Boostrap SCSS variables. You can include Bootstrap and
87+
BootstrapVue SCSS in your project's custom SCSS file:
9188

9289
```scss
9390
// custom.scss
@@ -102,8 +99,8 @@ $grid-breakpoints: (
10299
);
103100

104101
// Then include the following
105-
@include "bootstrap/scss/bootstrap";
106-
@include "bootstrap-vue/src/index.scss";
102+
@include 'bootstrap/scss/bootstrap';
103+
@include 'bootstrap-vue/src/index.scss';
107104
```
108105

109106
In your app main entry point include the single custom SCSS file (when using `sass-loader`):
@@ -113,13 +110,14 @@ In your app main entry point include the single custom SCSS file (when using `sa
113110
import 'custom.scss'
114111
```
115112

116-
117113
## Vue CLI 2
118114

119115
BootstrapVue has two Vue CLI templates available:
120116

121-
- [webpack-simple](https://github.com/bootstrap-vue/webpack-simple): Quick scaffold for a proof of concept or small app
122-
- [webpack](https://github.com/bootstrap-vue/webpack): Larger, production ready template with more options
117+
- [webpack-simple](https://github.com/bootstrap-vue/webpack-simple): Quick scaffold for a proof of
118+
concept or small app
119+
- [webpack](https://github.com/bootstrap-vue/webpack): Larger, production ready template with more
120+
options
123121

124122
```bash
125123
# Ensure Vue CLI is installed and up to date
@@ -141,7 +139,6 @@ npm run dev
141139
You can repeat the commands above replacing `bootstrap-vue/webpack-simple` with
142140
`bootstrap-vue/webpack` for the webpack template.
143141

144-
145142
## Vue CLI 3
146143

147144
Unlike V2, Vue CLI 3 doesn't use templates.
@@ -158,8 +155,8 @@ Enter the `my-project` directory and install `bootstrap-vue`:
158155
npm i bootstrap-vue
159156
```
160157

161-
Under the hood, Vue CLI uses webpack, so we can register the BootstrapVue plugin
162-
as with the webpack instructions.
158+
Under the hood, Vue CLI uses webpack, so we can register the BootstrapVue plugin as with the webpack
159+
instructions.
163160

164161
```js
165162
import Vue from 'vue'
@@ -171,8 +168,9 @@ import 'bootstrap/dist/css/bootstrap.css'
171168
import 'bootstrap-vue/dist/bootstrap-vue.css'
172169
```
173170

174-
Optionally, you can import components individually, as [below](#individual-components-and-directives).
175-
To shorten import paths, we can add a webpack alias via `vue.config.js`.
171+
Optionally, you can import components individually, as
172+
[below](#individual-components-and-directives). To shorten import paths, we can add a webpack alias
173+
via `vue.config.js`.
176174

177175
```js
178176
const path = require('path')
@@ -181,25 +179,21 @@ module.exports = {
181179
configureWebpack: {
182180
resolve: {
183181
alias: {
184-
'bootstrap-components': path.resolve(
185-
__dirname,
186-
'node_modules/bootstrap-vue/es/components'
187-
),
182+
'bootstrap-components': path.resolve(__dirname, 'node_modules/bootstrap-vue/es/components')
188183
}
189184
}
190185
}
191186
}
192187
```
193188

194-
For additional configuration for Vue CLI 3 for using project relative paths for image src
195-
props on various BootstrapVue components, refer to the Vue CLI 3 section of the
189+
For additional configuration for Vue CLI 3 for using project relative paths for image src props on
190+
various BootstrapVue components, refer to the Vue CLI 3 section of the
196191
[Image Src Resolving](/docs/reference/images#vue-cli-3-support) reference page.
197192

198-
199193
## Individual components and directives
200194

201-
If you would like to only pull in a specific component or set of components, you can do
202-
this by directly importing those components.
195+
If you would like to only pull in a specific component or set of components, you can do this by
196+
directly importing those components.
203197

204198
To cherry pick a component/directive, start by importing it in the file where it is being used:
205199

@@ -232,11 +226,10 @@ Vue.directive('b-modal', BModalDirective)
232226
Vue and ES2015 allow for various syntaxes here, so feel free to utilize kebab-casing (shown),
233227
camelCasing, PascalCasing, and/or object property shorthand.
234228

235-
236229
### Component groups and Directives as Vue plugins
237230

238-
You can also import component groups and directives as Vue plugins by importing
239-
the component group or directive directory:
231+
You can also import component groups and directives as Vue plugins by importing the component group
232+
or directive directory:
240233

241234
```js
242235
// This imports all the layout components such as <b-container>, <b-row>, <b-col>:
@@ -256,17 +249,17 @@ import { Scrollspy } from 'bootstrap-vue/es/directives'
256249
Vue.use(Scrollspy)
257250
```
258251

259-
When importing as plugins, all subcomponents and related directives are imported in most cases.
260-
i.e. When importing `<b-nav>`, all the `<nav-*>` sub components are also included, as well all
261-
dropdown sub components. Component shorthand aliases (if any) are also included in the plugin.
252+
When importing as plugins, all subcomponents and related directives are imported in most cases. i.e.
253+
When importing `<b-nav>`, all the `<nav-*>` sub components are also included, as well all dropdown
254+
sub components. Component shorthand aliases (if any) are also included in the plugin.
262255

263256
Refer to the component and directive documentation for details.
264257

265258
### webpack + Babel
266259

267-
When importing components/directives individually, you must configure your app to properly
268-
build the BootstrapVue library source code. This commonly involves white-listing the node
269-
module for your babel loader rule in webpack.
260+
When importing components/directives individually, you must configure your app to properly build the
261+
BootstrapVue library source code. This commonly involves white-listing the node module for your
262+
babel loader rule in webpack.
270263

271264
```js
272265
// webpack.config.js
@@ -282,9 +275,10 @@ module.exports = {
282275
rules: [
283276
{
284277
test: /\.js$/,
285-
include: [ // Use `include` vs `exclude` to whitelist vs blacklist
278+
include: [
279+
// Use `include` vs `exclude` to whitelist vs blacklist
286280
path.resolve(__dirname, 'src'), // Whitelist your app source files
287-
require.resolve('bootstrap-vue'), // Whitelist bootstrap-vue
281+
require.resolve('bootstrap-vue') // Whitelist bootstrap-vue
288282
],
289283
loader: 'babel-loader'
290284
}
@@ -293,23 +287,26 @@ module.exports = {
293287
}
294288
```
295289

296-
297290
## Browser
291+
298292
```html
299293
<!-- Add this to <head> -->
300294
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
301-
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" />
295+
<link
296+
type="text/css"
297+
rel="stylesheet"
298+
href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css"
299+
/>
302300

303301
<script src="//unpkg.com/@babel/polyfill@latest/dist/polyfill.min.js"></script>
304302
<script src="//unpkg.com/vue@latest/dist/vue.min.js"></script>
305303
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script>
306304
```
307305

308-
309306
## Build Variants
310307

311-
Choosing the best variant for your build environment / packager helps less bundle sizes.
312-
If your bundler supports es modules, it will automatically prefer it over commonjs.
308+
Choosing the best variant for your build environment / packager helps less bundle sizes. If your
309+
bundler supports es modules, it will automatically prefer it over commonjs.
313310

314311
| Variant | Environments | Package path |
315312
| -------------- | --------------------- | ---------------------------------------------------------------------- |
@@ -318,38 +315,41 @@ If your bundler supports es modules, it will automatically prefer it over common
318315
| commonjs2 | webpack 1 / ... | `dist/bootstrap-vue.common.js` _or_ `dist/bootstrap-vue.common.min.js` |
319316
| UMD | Browser | `dist/bootstrap-vue.js` _or_ `dist/bootstrap-vue.min.js` |
320317

321-
322318
## Migrating a project already using Bootstrap
323319

324-
If you've already been using Bootstrap 4, there are a couple adjustments you may need to make to your project:
320+
If you've already been using Bootstrap 4, there are a couple adjustments you may need to make to
321+
your project:
325322

326323
- Remove the bootstrap.js file from your page scripts or build pipeline
327-
- If Bootstrap is the only thing relying on jQuery, you can safely remove it — BootstrapVue **does not** depend on jQuery
324+
- If Bootstrap is the only thing relying on jQuery, you can safely remove it — BootstrapVue **does
325+
not** depend on jQuery
328326
- Convert your native Bootstrap HTML markup into the simplified BootstrapVue custom component markup
329327

330-
331328
## Browser Support
332329

333330
### CSS
334-
BootstrapVue is to be used with Bootstrap 4 CSS/SCSS.
335-
Please see [Browsers and devices](https://getbootstrap.com/docs/4.2/getting-started/browsers-devices)
336-
for more information about browsers currently supported by Bootstrap 4.
331+
332+
BootstrapVue is to be used with Bootstrap 4 CSS/SCSS. Please see
333+
[Browsers and devices](https://getbootstrap.com/docs/4.2/getting-started/browsers-devices) for more
334+
information about browsers currently supported by Bootstrap 4.
337335

338336
### JS
339-
BootstrapVue is written in Vue! So this is up to your project and bundler which browsers are supported.
337+
338+
BootstrapVue is written in Vue! So this is up to your project and bundler which browsers are
339+
supported.
340340

341341
If you want to support older IE, Android and IOS devices, you may want to use
342342
[Babel Polyfill](https://babeljs.io/docs/usage/polyfill):
343343

344344
- `npm install @babel/polyfill`
345345
- Import it in your app main entry point with `import '@babel/polyfill'`
346346

347-
348347
## Tooling Support
349348

350349
### VS Code + Vetur
351-
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue
352-
has intellisense autocompletion for component attributes available when using the
350+
351+
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
352+
intellisense autocompletion for component attributes available when using the
353353
[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur).
354354

355355
[Twitter: Vetur + BootstrapVue](https://twitter.com/AlexSashaRegan/status/912769997776158723)

0 commit comments

Comments
 (0)