Skip to content

Commit

Permalink
feat: auto-generate file web-types.json for WebStorm, and files `ve…
Browse files Browse the repository at this point in the history
…tur-tags.json` and `vetur-attributes.json` for Vetur (closes #4107) (#4110)
  • Loading branch information
tmorehouse authored Oct 15, 2019
1 parent 25dacb5 commit 1a3e6a5
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 3 deletions.
11 changes: 9 additions & 2 deletions docs/markdown/intro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,15 @@ above for an example.

## Tooling support

BootstrapVue provides additional helper files for auto completion in popular IDE editors.

### VS Code + Vetur

If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
intellisense autocompletion for component attributes available when using the
[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur).
intellisense autocompletion for component attributes and directives available via the
`dist/vetur-tags.json` and `dist/vetur-attributes.json` files.

### JetBrains WebStorm (and compatible)

For [WebStorm](https://www.jetbrains.com/webstorm/) editor (or web-types compatible), BootstrapVue
provides the file `dist/web-types.json` for component attribute and directive auto-completion.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
"sass": "src/index.scss",
"style": "dist/bootstrap-vue.css",
"license": "MIT",
"types": "src/index.d.ts",
"repository": "bootstrap-vue/bootstrap-vue",
"homepage": "https://bootstrap-vue.js.org",
"types": "src/index.d.ts",
"web-types": "dist/web-types.json",
"vetur": {
"tags": "dist/vetur-tags.json",
"attributes": "dist/vetur-attributes.json"
},
"contributors": [
{
"name": "Pooya Parsa",
Expand Down
5 changes: 5 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,9 @@ cd ..
echo 'Done.'
echo ''

echo 'Building IDE auto-complete helper files...'
node -r esm scripts/create-web-types.js || exit 1
echo 'Done.'
echo ''

echo 'Done building assets.'
Loading

0 comments on commit 1a3e6a5

Please sign in to comment.