Skip to content

Commit 0fbbb0c

Browse files
committed
(chore) Example: Update Collaborative Editor Example
Update Firebase Tools, Lint Staged and Prettier. Signed-off-by: Progyan Bhattacharya <[email protected]>
1 parent f1decc6 commit 0fbbb0c

File tree

4 files changed

+298
-1318
lines changed

4 files changed

+298
-1318
lines changed

examples/collaborative-editors/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ This example can help you get familiar with the API usage of `@otjs/firebase-ace
88

99
## Prerequisites
1010

11-
If you followed the [installation](https://github.com/0xTheProDev/Operational-Transformation#installation) steps successfully, you would have `lerna` and `yarn` installed globally.
11+
If you followed the [installation](https://github.com/0xTheProDev/Operational-Transformation#installation) steps successfully, you would have `lerna` and `pnpm` installed globally.
1212

13-
Before running this example, it's necessary to build all the packages using `yarn build` in the root (Operational-Transformation) directory.
13+
Before running this example, it's necessary to build all the packages using `pnpm build` in the root (Operational-Transformation) directory.
1414

1515
Also, the **_firebase.json_** in this directory has `database` entry where `rules` point to `".firebase/database.rules.json"` file which is not included with this repository. The user can add their own file with custom rules.
1616

1717
For development purpose, the following can be the content of this file :-
1818

19-
```
19+
```json
2020
{
2121
"rules": {
2222
".read": true,
@@ -29,7 +29,7 @@ For development purpose, the following can be the content of this file :-
2929

3030
The example doesn't need the user to be authenticated with **firebase** since it runs local **firebase-emulator** for development purposes.
3131

32-
- Run `yarn start` from the root of this directory to fire up both the emulator and the collaborative-editors UI (accessible at **localhost:8000**).
32+
- Run `pnpm start:editors` from the root of this directory to fire up both the emulator and the collaborative-editors UI (accessible at **localhost:8000**).
3333
![Landing Page](../../.github/images/examples/collaborative-editors/LandingPage.png)
3434

3535
- Click on the editor you want to test and you will be redirected to it.

examples/collaborative-editors/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"description": "Example usage of @otjs library as Real-time collaborative editor.",
6-
"main": "index.js",
6+
"main": "index.html",
77
"scripts": {
88
"start": "firebase emulators:exec \"yarn start:app\"",
99
"start:app": "webpack serve --hot --progress"
@@ -24,8 +24,6 @@
2424
"monaco-editor-webpack-plugin": "7.0.1",
2525
"source-map-loader": "4.0.1",
2626
"style-loader": "3.3.1",
27-
"webpack": "5.75.0",
28-
"webpack-cli": "5.0.1",
29-
"webpack-dev-server": "4.11.1"
27+
"webpack-dev-server": "4.15.1"
3028
}
3129
}

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"postinstall": "husky install",
77
"clean": "lerna run clean --no-private",
88
"build": "lerna run build --no-private",
9+
"start:editors": "pnpm run --filter '@otjs-examples/collaborative-editors' start",
910
"precoverage": "./scripts/merge-coverage-reports.sh",
1011
"coverage": "nyc merge coverage-all coverage/coverage.json",
1112
"coverage:clean": "rimraf coverage-* coverage",
@@ -17,7 +18,7 @@
1718
"test:monaco": "pnpm run --filter '@otjs-tests/monaco' test:ci",
1819
"test:watch": "pnpm run test --watch",
1920
"lint": "pnpm run lint:prettier",
20-
"lint:prettier": "prettier --write packages/**/*.ts",
21+
"lint:prettier": "prettier --write packages/**/*.ts examples/**/*.ts",
2122
"release": "lerna version --no-private --exact"
2223
},
2324
"repository": {
@@ -37,15 +38,15 @@
3738
"@types/regenerator-runtime": "0.13.5",
3839
"babel-jest": "29.7.0",
3940
"canvas": "2.11.2",
40-
"firebase-tools": "11.18.0",
41+
"firebase-tools": "13.0.2",
4142
"husky": "8.0.3",
4243
"identity-obj-proxy": "3.0.0",
4344
"jest": "29.7.0",
4445
"jest-environment-jsdom": "29.7.0",
4546
"lerna": "8.0.1",
46-
"lint-staged": "13.1.0",
47+
"lint-staged": "15.2.0",
4748
"nyc": "15.1.0",
48-
"prettier": "2.8.1",
49+
"prettier": "3.1.1",
4950
"regenerator-runtime": "0.14.1",
5051
"rimraf": "3.0.2",
5152
"ts-jest": "29.1.1",

0 commit comments

Comments
 (0)