Closed nebrelbug closed 3 years ago
@nebrelbug Point me to squirrelly-next
and I'll start contributing when I have time.
@jasonfutch sorry for the late response! I'm on vacation with limited access to internet. Contributions will be awesome! I don't have squirrelly-next
up quite yet, but I should publish my work within the next 15 days, and I'll let you know when I do :)
Awesome !
@jasonfutch @hustcer hey, just realized I never replied!
I actually just recently merged squirrelly-next
with this repo and published v8 as a beta on the master branch! I don't have documentation written for it yet, but I'd love any contributions.
You should be able to look in the tests/
folder and the source code to get an idea of the API.
After a lot of thought, I have decided that one more major version is in order before the complete rewrite.
Probable Changes
Better tooling (easier / more powerful caching, etc.)
- Caching, loading templates as files, etc. all need updatesLayouts, template inheritance
It's trivial to write a helper or native helper that allows you to do this (see [this demo](https://stackblitz.com/edit/squirrelly-layouts?file=index.js)) but the syntax is kinda clunkyNon-precompiled partials
Right now, partials are put into the template at runtime.Rename `options` to `it`
More concise and doT-likeMethod standardization
Right now, `Render` and `renderFile` have different capitalizationJS-styled comments (`/* ... */` instead of `!-- ... --`)
Easier to read & writePossible Changes
Explicit helper references (see #120)
- This would mean no more helper scoping, which would simplify creating templates - Remove use of `@` entirely?Multiple blocks of the same type
This would allow for blocks like `elif`, `scopedown`, etc.Block, filter parameters
Distinguish between helpers, references using `~`
This may require more work. I'll look into thisEssentially, the next version (version 8) would use the same strategy of using Regular Expressions to parse, while removing many of the limitations of the current implementation. It wouldn't have nice features like JavaScript syntax validation, but that shouldn't be much of an issue.
The new, rewritten parser that's currently in development would be published at
squirrelly-next
, and eventually become Squirrelly version 9.