Skip to content

Commit 1a3e6a5

Browse files
authored
feat: auto-generate file web-types.json for WebStorm, and files vetur-tags.json and vetur-attributes.json for Vetur (closes #4107) (#4110)
1 parent 25dacb5 commit 1a3e6a5

File tree

4 files changed

+491
-3
lines changed

4 files changed

+491
-3
lines changed

docs/markdown/intro/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,15 @@ above for an example.
742742

743743
## Tooling support
744744

745+
BootstrapVue provides additional helper files for auto completion in popular IDE editors.
746+
745747
### VS Code + Vetur
746748

747749
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
748-
intellisense autocompletion for component attributes available when using the
749-
[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur).
750+
intellisense autocompletion for component attributes and directives available via the
751+
`dist/vetur-tags.json` and `dist/vetur-attributes.json` files.
752+
753+
### JetBrains WebStorm (and compatible)
754+
755+
For [WebStorm](https://www.jetbrains.com/webstorm/) editor (or web-types compatible), BootstrapVue
756+
provides the file `dist/web-types.json` for component attribute and directive auto-completion.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
"sass": "src/index.scss",
1111
"style": "dist/bootstrap-vue.css",
1212
"license": "MIT",
13-
"types": "src/index.d.ts",
1413
"repository": "bootstrap-vue/bootstrap-vue",
1514
"homepage": "https://bootstrap-vue.js.org",
15+
"types": "src/index.d.ts",
16+
"web-types": "dist/web-types.json",
17+
"vetur": {
18+
"tags": "dist/vetur-tags.json",
19+
"attributes": "dist/vetur-attributes.json"
20+
},
1621
"contributors": [
1722
{
1823
"name": "Pooya Parsa",

scripts/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,9 @@ cd ..
8484
echo 'Done.'
8585
echo ''
8686

87+
echo 'Building IDE auto-complete helper files...'
88+
node -r esm scripts/create-web-types.js || exit 1
89+
echo 'Done.'
90+
echo ''
91+
8792
echo 'Done building assets.'

0 commit comments

Comments
 (0)