Hey! 6 months into Wappler, doing incredible things and really happy with the results so far.
Now that a few of the projects I made in NodeJS are ready for deploying into production, I got a rather uncofortable question from a third-party senior developer that reviewed the code (that is working perfectly, btw) caused by the presence of the line of text "<!-- Wappler include..." that appears when someone checks the source code of the pages, right in the point where the header from the layout page includes the content.
I tryed a lot of things to make that line not ge(except of manually creating new html pages with the head already on them)t into the complete rendered code of the page in production environment , or changing that text to something that doesn't raise nonsense questions from developers that are not really open minded about things related to anything low/no-code, but can't find out how.
Is there any way to do this without messing with the files directly?
The components and frameworks are auto added to this comment section when added on your content pages - they are added there so the design view knows what components and frameworks are used and includes them for design and on the main page.
@Teodor Are you saying that the comments are only needed then during the design of the page? Once the page is complete and the frameworks and components won't change, it would be possible to delete the comment section?
I can see the drawback immediately however, if the page was to undergo additional design in the future. Not having those comments would prevent the Wappler UI's design view from working correctly.
Well, you'll need some sort of what's usually called a "build" process, in which you run a script that copies your project files to a new folder or something and removes all lines that start with "<!-- Wappler include", and then you give this folder for production deployment. This won't remove the lines in development, they're needed for the Wappler editor to work correctly, so your colleague developers could still see it in the source-code of the project.
You can search about "frontend build process" to get a sense of what tools are available in the industry, but I don't have any particular advice as I don't use any of them. If I were doing this on my own I'd write a script (maybe in Python or some Bash with sed) to do what I described in the previous paragraph.
Risky to assume you'll never need to edit the page, better to use a build process as described above
Great suggestion. I actually already use a custom deployment pipeline that I've been developing that runs when I do merges in the repositories and can easily implement your suggestion without disturbing the files used in the Wappler. This community is amazing, thank you for the insight!
About the said developer, he does not have access to the source code. He is an employee at the IT dep. of the client company and has to approve the product. These <!-... lines that serve no purpose whatsoever in the code are being delivered to the front end in the deployed production app. I'm the single full stack father of the projects.