Skip to content

Commit

Permalink
Update example version to v0.4.28 (#877)
Browse files Browse the repository at this point in the history
* Update example version to v0.4.28

* Add update:examples script

---------

Co-authored-by: Youngteac Hong <[email protected]>
  • Loading branch information
chacha912 and hackerwins authored Jul 25, 2024
1 parent 25bb409 commit 83a6369
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 33 deletions.
2 changes: 1 addition & 1 deletion examples/nextjs-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "18.2.0",
"react-calendar": "^4.6.0",
"react-dom": "18.2.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/node": "20.4.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/profile-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"vite": "^3.2.7"
},
"dependencies": {
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/react-tldraw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"unique-names-generator": "^4.7.1",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/lodash": "^4.14.198",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"todomvc-app-css": "^2.4.2",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/react": "^18.0.24",
Expand Down
2 changes: 1 addition & 1 deletion examples/simultaneous-cursors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/react": "^18.0.37",
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-codemirror6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@codemirror/state": "^6.1.2",
"@codemirror/view": "^6.3.1",
"codemirror": "^6.0.1",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/vanilla-quill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"quill": "^1.3.7",
"quill-cursors": "^4.0.0",
"quill-delta": "^5.0.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/vuejs-kanban/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"vue": "^3.2.41",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.1.2",
Expand Down
155 changes: 130 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"test:ci": "vitest run --coverage",
"test:yorkie.dev": "TEST_RPC_ADDR=https://api.yorkie.dev vitest run --coverage",
"lint": "eslint . --fix --max-warnings=0 --ext .ts",
"update:examples": "./scripts/update-examples.sh",
"prepare": "npm run build"
},
"engines": {
Expand Down
30 changes: 30 additions & 0 deletions scripts/update-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Get the version of yorkie-js-sdk
read -p "Enter the yorkie-js-sdk version: " version

# Change the directory to the examples folder
cd examples

# Loop through all example folders
for dir in */; do
# Check if it is a directory and exclude the dist folder
echo $dir
if [ -d "$dir" ] && [ "$dir" != "dist/" ]; then
# Move to the example folder
cd "$dir"

# Execute npm i and npm run build
npm i "yorkie-js-sdk@$version" && npm run build

# Check the result of the execution
if [ $? -ne 0 ]; then
echo "Error occurred in $dir"
else
echo "$dir build succeeded"
fi

# Move back to the examples folder
cd ..
fi
done

0 comments on commit 83a6369

Please sign in to comment.