Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Squirrelly version 8: layouts, plugins, new parser, and new language features #106
Squirrelly version 8 is underway!
Feel free to comment with suggestions or requests!
Syntax and Code Changes
Having the option to hide "undefined" for variable might be a good idea. Maybe production vs debug setting?
As in session / local storage caching? That is what i currently do with templates. I found keeping them in the session storage, is a good balance between keeping "up to date" and being able to update on changes.
Another technique i have experimented with, is including in the local scope by adding the templates into a local div ( in the main document ). It works but its "tricky". And more prone to conflicts.
As in single request or multi http requests?
General tip: KISS ...
A few more tips:
On the website: Overview > options.somevalue ... Add on the top a real example of data. This allows people to see the flow of the code and not pseudo code.
I think your benchmarks may be out of date?
Notice how Marko has almost double to performance on the Friends. Or how if-expression Marko was slower then Pug but in the new tests Makro is way faster. If these results hold, the gap between Marko and squirrelly is smaller then the old results?
@Indribell thanks for the feedback!
Maybe we should add a production flag that would add hiding
Right now, I think I'll just add a way to export as a JS/JSON object. That way, you could save it in a separate file, in local or session storage, etc., and then load it when needed.
Always a good thing to keep in mind
One request will load the entire library, including helpers, partials, native helpers, layouts, filters, etc., that will be stored in a JS object or JSON file.
Actually, my branch is based on the very newest version of the benchmarks. I think they have different results because the times are based on the local computer. Whoever owns the markojs repository probably has a nicer computer than me
I'm trying to add working Runkit examples to the docs, but the styling is broken. Hopefully I'll get this working soon
Version 8 Update
Don't worry if you haven't seen any recent development on GitHub--right now, I'm working on my local computer.
After a lot of thought, I'm currently handwriting a parser that I think will make Squirrelly more reliable and functional.
The basic template syntax will probably stay the same, except helpers will be prefixed with
@raydenx I just finished the new parser (probably the most difficult part) and I've tested out Rollup. Currently, the main thing I need to do is add aysnc support to templates, and I'm hoping I'll have that done by mid-July, and a full release by the end of July.