Skip to content

Commit c458884

Browse files
build: add script to generate Vuetify API data
Also the answer to #270
1 parent 5c93cc8 commit c458884

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build/
1111

1212
# generated code
1313
generate_source/build
14+
generate_source/vuetify
1415
ipyvuetify/generated
1516
js/src/generated
1617

generate_source/generate_api.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
#Note!: this will only work on node <=14
4+
5+
# use script directory as working directory
6+
cd "${0%/*}"
7+
8+
rm -rf vuetify
9+
git clone --branch v2.2.26 --depth 1 https://github.com/vuetifyjs/vuetify.git
10+
npm install -g yarn
11+
python patch_vuetify_build.py
12+
(cd vuetify && yarn --ignore-optional && yarn build)
13+
14+
node -e 'console.log(JSON.stringify(require("./vuetify/packages/api-generator/dist/api.js"), null, 2))' > vuetify_api.json
15+
pre-commit run --files vuetify_api.json
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# upgrading these packages fails when using yarn cli
2+
for path in ["vuetify/packages/vuetify/package.json", "vuetify/packages/docs/package.json"]:
3+
with open(path, "r") as f:
4+
file_contents = f.read()
5+
6+
with open(path, "w") as f:
7+
f.write(file_contents.replace('"fibers": "^4.0.1"', '"fibers": "^5"'))

0 commit comments

Comments
 (0)