fix(ot): add minified updated OT library and build:ot script

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson
2026-03-18 20:34:17 +01:00
committed by Philip Molares
parent 5a5e12a693
commit ca31580db5
6 changed files with 23 additions and 3 deletions

View File

@@ -11,3 +11,10 @@ And even more in this 2010 article series:
- <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_21.html> - <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_21.html>
- <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_22.html> - <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_22.html>
- <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs.html> - <https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs.html>
## OT library
HedgeDoc uses a vendored version of OT.js. The source code lives under `public/vendor/ot/`.
The HedgeDoc frontend uses a minified build `public/vendor/ot/ot.min.js`.
This build is generated by `yarn run build:ot`. This needs to be done after changes to the OT code.

View File

@@ -52,6 +52,7 @@ To copy this checklist please go to [this link](https://github.com/hedgedoc/hedg
mkdir /tmp/hedgedoc && cd /tmp/hedgedoc mkdir /tmp/hedgedoc && cd /tmp/hedgedoc
git clone -b master https://github.com/hedgedoc/hedgedoc.git . git clone -b master https://github.com/hedgedoc/hedgedoc.git .
yarn install yarn install
yarn build:ot
yarn build yarn build
cd .. cd ..
tar cvzf hedgedoc-x.y.z.tar.gz --sort=name --exclude hedgedoc/node_modules --exclude hedgedoc/.git --exclude hedgedoc/.github --exclude hedgedoc/.yarn/cache hedgedoc tar cvzf hedgedoc-x.y.z.tar.gz --sort=name --exclude hedgedoc/node_modules --exclude hedgedoc/.git --exclude hedgedoc/.github --exclude hedgedoc/.yarn/cache hedgedoc

View File

@@ -14,6 +14,7 @@
"dev": "webpack --config webpack.dev.js --progress --watch", "dev": "webpack --config webpack.dev.js --progress --watch",
"heroku-prebuild": "bin/heroku", "heroku-prebuild": "bin/heroku",
"build": "webpack --config webpack.prod.js --progress", "build": "webpack --config webpack.prod.js --progress",
"build:ot": "bash -c \"cd public/vendor/ot && ./compress.sh\"",
"start": "node app.js" "start": "node app.js"
}, },
"dependencies": { "dependencies": {
@@ -196,6 +197,7 @@
"spin.js": "4.1.2", "spin.js": "4.1.2",
"string-loader": "0.0.1", "string-loader": "0.0.1",
"turndown": "7.2.2", "turndown": "7.2.2",
"uglify-js": "3.19.3",
"url-loader": "4.1.1", "url-loader": "4.1.1",
"velocity-animate": "1.5.2", "velocity-animate": "1.5.2",
"visibilityjs": "2.0.2", "visibilityjs": "2.0.2",

View File

@@ -1,4 +1,4 @@
uglifyjs --compress --mangle --output ot.min.js \ yarn uglifyjs --compress --mangle --output ot.min.js \
./text-operation.js \ ./text-operation.js \
./selection.js \ ./selection.js \
./wrapped-operation.js \ ./wrapped-operation.js \

File diff suppressed because one or more lines are too long

View File

@@ -1635,6 +1635,7 @@ __metadata:
string-loader: "npm:0.0.1" string-loader: "npm:0.0.1"
toobusy-js: "npm:0.5.1" toobusy-js: "npm:0.5.1"
turndown: "npm:7.2.2" turndown: "npm:7.2.2"
uglify-js: "npm:3.19.3"
umzug: "npm:2.3.0" umzug: "npm:2.3.0"
url-loader: "npm:4.1.1" url-loader: "npm:4.1.1"
utf-8-validate: "npm:6.0.6" utf-8-validate: "npm:6.0.6"
@@ -16658,6 +16659,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"uglify-js@npm:3.19.3":
version: 3.19.3
resolution: "uglify-js@npm:3.19.3"
bin:
uglifyjs: bin/uglifyjs
checksum: 10/6b9639c1985d24580b01bb0ab68e78de310d38eeba7db45bec7850ab4093d8ee464d80ccfaceda9c68d1c366efbee28573b52f95e69ac792354c145acd380b11
languageName: node
linkType: hard
"uid-safe@npm:~2.1.5": "uid-safe@npm:~2.1.5":
version: 2.1.5 version: 2.1.5
resolution: "uid-safe@npm:2.1.5" resolution: "uid-safe@npm:2.1.5"