KASM-7163 Update DEVELOP.md to import Interactjs via script (#132)

KASM-7163 Update DEVELOP.md to import Interactjs via script
This commit is contained in:
Dmitry Maksyoma 2025-04-15 22:57:16 +12:00 committed by GitHub
parent 5c46b2e13a
commit 396644068b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -10,21 +10,22 @@ sudo rm -rf www
sudo git clone https://github.com/kasmtech/noVNC.git www sudo git clone https://github.com/kasmtech/noVNC.git www
sudo chown -R user:user www sudo chown -R user:user www
cd www cd www
sed -i 's#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>#' vnc.html sed -i "s#base.css\">#base.css\">\n <script type="module" src="vendor/interact.min.js"></script>#" index.html
sed -i 's#<!--link rel="stylesheet" href="app/styles/base.css">#<link rel="stylesheet" href="app/styles/base.css">#' vnc.html
sed -i 's#import "core-js/stable";#//import "core-js/stable";#' app/ui.js sed -i 's#import "core-js/stable";#//import "core-js/stable";#' app/ui.js
sed -i 's#import "regenerator-runtime/runtime";#//import "regenerator-runtime/runtime";#' app/ui.js sed -i 's#import "regenerator-runtime/runtime";#//import "regenerator-runtime/runtime";#' app/ui.js
sed -i 's#\(import.\+@interactjs\)#//\1#' app/ui.js
``` ```
Now connect to https://address/vnc.html, create a symlink if you need it to be index.html Now connect to https://address/index.html, create a symlink if you need it to be index.html
## Before Commiting Changes ## Before Commiting Changes
Undo the HTML/JS changes that allow you to run the code directly without the webpack. Undo the HTML/JS changes that allow you to run the code directly without the webpack.
```bash ```bash
cd /usr/share/kasmvnc/www cd /usr/share/kasmvnc/www
sed -i 's#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->#' vnc.html sed -i '/interact.min.js/d' index.html
sed -i 's#<link rel="stylesheet" href="app/styles/base.css">#<!--link rel="stylesheet" href="app/styles/base.css">#' vnc.html
sed -i 's#//import "core-js/stable";#import "core-js/stable";#' app/ui.js sed -i 's#//import "core-js/stable";#import "core-js/stable";#' app/ui.js
sed -i 's#//import "regenerator-runtime/runtime";#import "regenerator-runtime/runtime";#' app/ui.js sed -i 's#//import "regenerator-runtime/runtime";#import "regenerator-runtime/runtime";#' app/ui.js
sed -i 's#//\(import.\+@interactjs\)#\1#' app/ui.js
``` ```