[WIP] Compress all your "main.html" dependencies into it.

3 views
Skip to first unread message

Maxime Istasse

unread,
Apr 27, 2013, 3:38:26 PM4/27/13
to node-...@googlegroups.com
Hello!

I've made an application today(got the idea yesterday evening, thinking it would be really complex) , I wanted to know if you guys were interested in it.
It consists into a software (made with node-webkit :p ) that replaces every URL into your file into the bas64 equivalent. It respects the hierarchy. (the images
into a css file will be encoded into it) I've made a little video here, I'm sorry but I have a rather bad english atm, I'm usually not that good + I'm really tired right now.

http://youtu.be/GXz6EvhrCTg

Because as I told I haven't maybe be really clear in the video, I describe you briefly here:
The software is able to detect dependencies from your main.html file (except in AJAX requests, and some case, but it shoud change).
Then you choose what files you want to package into the HTML file and it compresses it into the file you want. In fact, it also works with css,
but I see no true reason for compressing only a stylesheet, even if containing images.

That way, you only need your "classic node-webkit files" into your project and the main.html.
Furthermore, it prevents URI conflicts that get you when you append your app.zip after the nw.exe file. You don't need to separate packaged files
with other ones using "process.execPath" for the permanent ones.

The most useful I think is that it makes you a clean directory without having to decompress the content of the app everytime you run the application,
thing that is extremely slow when you begin to have a borning structure.

If you're interested in it, I can try to release it to you in the week. I think it's a good initiative, even if I must admit it wasn't that complex to realize.
I'm also thinking about obfuscating right before the compression, it won't be that hard to implement, and add support to more formats.

I don't think I'll really need it right now, but if anyone wants to help me on this I'm aware of anything.

It would be really great for me to have your support, I'm making my website in parallel and I would be proud to he some people following my projects.
See you guys! And thanks for everything.

Maxime Istasse

unread,
Apr 28, 2013, 3:11:08 AM4/28/13
to node-...@googlegroups.com
I've added support to Javascript, so when a script, for example, calls 'new Image().src = "img/myLocalFile.png"', the URL behind it is recognized.
I'm beginning to obfuscate the code, make it dirty, then I'm planning to even obfuscate ID's and classes in the HTML (optionally).

I'm also planning on showing which files are dependent on the one you're watching. That's already in logic, I just have to make a nice-looking to do that, so you can better evaluate whether or not you should package it.(if there are 2 dependencies, you have to know it'll be duplicated)

I really think it would be possible to give you a nice release this week. And ah yeah, I forgot. The only current needs for the software to recognize your URLs is that they have to be into double quotes ( " ). I'll try to change it for you but I like this way, it fits the way I'm used to code.
Reply all
Reply to author
Forward
0 new messages