Skip to content

Commit

Permalink
Update HOWTO-Test-Locally.md
Browse files Browse the repository at this point in the history
More detailed process of building the WebUI on a Windows 11 machine
  • Loading branch information
ryan1smith authored Aug 15, 2024
1 parent 5deb3ed commit 2da92e4
Showing 1 changed file with 56 additions and 4 deletions.
60 changes: 56 additions & 4 deletions HOWTO-Test-Locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand All @@ -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:

Expand Down

0 comments on commit 2da92e4

Please sign in to comment.