diff --git a/HOWTO-Test-Locally.md b/HOWTO-Test-Locally.md index e2da7bf83..ec9a48c5b 100644 --- a/HOWTO-Test-Locally.md +++ b/HOWTO-Test-Locally.md @@ -2,13 +2,59 @@ ## Compiling -WebUI is compiled with the "gulp" packager program that runs on top of nodejs. Search the -web for how to install nodejs and gulp on your system. Once gulp is present, run this in -the top-level directory. +WebUI is compiled with the "gulp" packager program (https://gulpjs.com/docs/en/getting-started/quick-start) that runs on top of nodejs. + +Complete process for building using CMD (run as administrator) on Windows 11: + +You may need to change Windows security settings temporarily using Powershell (run as admin) +``` +Get-ExecutionPolicy -List +Set-ExecutionPolicy RemoteSigned -Scope Process +``` +Press 'y' + +Install gulp +``` +npm install --global gulp-cli +``` +Go to the folder you want: +``` +cd C:\Users\your\folder +``` +Clone the repo +``` +git clone https://github.com/MitchBradley/ESP3D-WEBUI.git +``` +Go to the root +``` +cd ESP3D-WEBUI +``` +Update the line in package.json from 0.0.1 to: +``` +"gulp-filesize": "^0.0.6", ``` -$ gulp package --lang en +Install dependencies ``` +npm install +``` +Get submodule updates +``` +git submodule update --init +``` +Build the index.html.gz +``` +gulp package --lang en +``` + +Revert the security settings in Powershell +``` +Set-ExecutionPolicy Restricted -Scope Process +Get-ExecutionPolicy -List +``` + + + That will create an "index.html.gz" file in the top directory, and an non-compressed version in "dist/index.html". @@ -24,6 +70,12 @@ You can upload index.html.gz to a FluidNC ESP32 machine and run it from there by browsing to the FluidNC IP address. That is the normal way of using WebUI. +If you're testing on a physical FluidNC machine and you break the page, you can delete the old index.html.gz file in the terminal serial monitor using +``` +$Localfs/Delete=index.html.gz +``` +Refreshing the page will give a default page that allows you to upload a new file + Alternatively, for a quicker test of a new build, you can avoid the upload step by starting a proxy server with: