Back to Welcome
Inlinerize tool
I was kind of sick of Angular and React frameworks.
I wanted to try just writing plain browser language (html,css,js).
I decided to make this tool which can basically copy paste all the browser files together
so I can still use a one page web app mindset.
This is good because the entire UI is one file so the browser can fetch it once.
All the content can be displayed immediately, minus any delays of fetching json.
By having the rest of the content be in json format,
it's easier to simulate frontend fetches to the backend during testing.
This is app.html
<h1>This is app.html file Begin</h1>
<!--inlinerize:somePage.html-->
<h1>This is app.html file End</h1>
This is somePage.html
<h1>This is somePage.html file Begin</h1>
<!--inlinerize:someComponent.html-->
<!--inlinerize:someComponent.html-->
<h1>This is somePage.html file End</h1>
This is someComponent.html
<h1>This is someComponent.html file Begin</h1>
<button>Re-usable button</button>
<h1>This is someComponent.html file End</h1>
Use on command line
myself@myComputer MINGW64 ~/bin/inlinerizeSrc
$ inlinerize.exe app.html index.html
inlining app.html
inlining somePage.html
inlining someComponent.html
inlining someComponent.html
Done inlinerizing app.html files into index.html
This is the final index.html generated
<h1>This is app.html file Begin</h1>
<h1>This is somePage.html file Begin</h1>
<h1>This is someComponent.html file Begin</h1>
<button>Re-usable button</button>
<h1>This is someComponent.html file End</h1>
<h1>This is someComponent.html file Begin</h1>
<button>Re-usable button</button>
<h1>This is someComponent.html file End</h1>
<h1>This is somePage.html file End</h1>
<h1>This is app.html file End</h1>
The tool will read a files comments to inline more files.
The inlining process is recursive and will traverse all files as needed.
I wrote this in C (with some assistance from chatGPT) because I wanted this
to be easy to use when needed for various projects.
I can put this in my home/bin folder (which is on PATH) and call it.
Another reason to write this in C is because it, pretty much,
has no dependencies so it's easy to install.
I'm still tinkering on this tool.