Page 1 of 1
Publishing external javascript files
Posted: Sun Oct 24, 2021 12:54 pm
by ncpunt
I am using web builder for designing the GUI of a photino application. I put all my javascript in a single file (main.js) that I maintain using Visual Studio. I added this file to a web builder project using Site Manager ("Add external file"). But any changes in the javascript file are not propagated to web builder. Is there no way to publish externally maintained files?
Re: Publishing external javascript files
Posted: Sun Oct 24, 2021 1:08 pm
by Pablo
The option 'external file' is only for HTML pages, so you can make them part of the site structure.
If you want to add other files then you can use the File Publisher object.
https://www.wysiwygwebbuilder.com/add_html.html
Re: Publishing external javascript files
Posted: Mon Oct 25, 2021 5:18 am
by ncpunt
Yes, that works perfect! This allowes me to use Web Builder (GUI) and Visual Studio (C#.NET and JavaScript) side by side for application development in which Web Builder takes the role of the GUI designer like the WinForms designer in Visual Studio. I think for people like me the <HTML> component in combination with the File Publisher make Web Builder a very attractive solution for programmers. I love it.
Re: Publishing external javascript files
Posted: Tue Oct 26, 2021 7:32 am
by ncpunt
It worked perfect initially. Changes in the source files were nicely propagated to the published web site. But this stops at random after, which I am required to remove all modified files from the File Publisher and add them back again. This can lead to instant insanity.
Re: Publishing external javascript files
Posted: Tue Oct 26, 2021 7:55 am
by Pablo
Note that if you you enable 'Asset Management' in Tools -> Options -> Files & Folders then the files will be copied to the projetc folder.
So, in that case you will need to replace the files in that folder.
If you uncheck 'Asset Management' then the files will be loaded from the original location.
Re: Publishing external javascript files
Posted: Wed Oct 27, 2021 11:37 am
by ncpunt
Works! Thank you so much.