Thanks for the pointers. Due to the somewhat unique nature of my plugin, I've ended up with a combination of your suggestions and my own clumbsiness. Still, its working fine, not refreshing the page, and showing as "stopped" after a manual refresh 🙂
@stuartofmt Looked at your code on github - I don't think you have to switch to typescript, you just need to change the way you use the inbuilt DWC functions (which is all I did with BtnCmd).
Many, many thanks. The need to switch (or not) to typescript was one of the things that I was very unsure of. Most of what I had read said "should not be necessary".
I had no idea about the change to the inbuilt functions - given a few weeks by myself, I may have stumbled on to that fact 🙂
I've compiled and tested on my end and everything is workin just fine. Again THANK YOU !!
@stuartofmt I currently use both (Pi-hole doesn't work for some sites, even after adding the domains they use for ads), I will just add an excpetion to the ad-block for the duet page
Yeah - I hear you. And not much to be done when the adds are resolved at the server end. Personally, I was lucky to even get away with pihole. SWMBO still gets annoyed with the "sponsored" search results not being accessible, 🙄
I ended up with some errors due to having a later version of nodejs and / or npm. After searching, guess what ? I found a reply I had made in a post where I had linux bash script to do the job. Of course I'd deleted the script when I discovered my Pi was not the way to go. Anyway, in that thread was also the answer to the SSL related error.
To anyone stubling on this thread, here is a windows batch file that works for the current ( as of this date) versions.
:: Simple batch file to create a dev environment for DWC
:: Needed for plugin development
:: Tested with npm 9.5.0, nodejs 18.5.0 and DWC 3.4.5
:: Start with a new directory
if exist DWC\ (
rmdir /s DWC
:: download DWC from github
git clone -b master --depth=1 https://github.com/Duet3D/DuetWebControl DWC
:: Setup DWC
cmd.exe /c npm install
:: Check everything is basically OK
cmd.exe /c npm audit --only prod
:: Run DWC
cmd.exe /c npm run serve