{"action":"closed","issue":{"url":"https://api.github.com/repos/kirbysayshi/vash/issues/35","labels_url":"https://api.github.com/repos/kirbysayshi/vash/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/kirbysayshi/vash/issues/35/comments","events_url":"https://api.github.com/repos/kirbysayshi/vash/issues/35/events","html_url":"https://github.com/kirbysayshi/vash/issues/35","id":30004532,"number":35,"title":"RFC: Changes coming in vash 0.8.x","user":{"login":"kirbysayshi","id":90831,"avatar_url":"https://avatars.githubusercontent.com/u/90831?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbysayshi","html_url":"https://github.com/kirbysayshi","followers_url":"https://api.github.com/users/kirbysayshi/followers","following_url":"https://api.github.com/users/kirbysayshi/following{/other_user}","gists_url":"https://api.github.com/users/kirbysayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbysayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbysayshi/subscriptions","organizations_url":"https://api.github.com/users/kirbysayshi/orgs","repos_url":"https://api.github.com/users/kirbysayshi/repos","events_url":"https://api.github.com/users/kirbysayshi/events{/privacy}","received_events_url":"https://api.github.com/users/kirbysayshi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-03-24T01:34:51Z","updated_at":"2015-03-24T03:33:00Z","closed_at":"2015-03-24T03:33:00Z","body":"I'm currently in the process of rewriting vash to be more extensible and stable, and to fix a few bugs (#26 especially, #27 to an extent) that are currently neigh unfixable or would be huge hacks with the current architecture. While the parser is becoming more complex, the lexer and compiler are becoming much more simple. In addition, vash will gain true HTML awareness, including HTML attributes and proper void tag support.\r\n\r\nSyntax-wise, a template that compiled with 0.7 should compile with 0.8. I also plan to keep the 0.7 branch around for awhile until 0.8 stabilizes, assuming I get some feedback. I'll reply back here when the 0.8 branch is created and ready for testing (the ksh/stated branch is close, but you'll have to `require('vash/experiments/stated')` with a local repo to get things working).\r\n\r\nThe current work is being done here: https://github.com/kirbysayshi/vash/tree/ksh/stated/experiments/stated. All tests are currently passing (some with a few modifications), and I plan to move these files into their true home (/src or maybe /lib) very soon to being shoring up the build steps final patterns for third party inclusion.\r\n\r\nSince this is all brand new, I also want to take some time to revisit a few things:\r\n\r\n### Build Process / Shipped Builds\r\nCurrently quite custom, manually concatenating everything. The 0.8 version will be using CJS, and thus in nodejs the code will just be the files (`require('vash')` will point at an `index.js` instead of a `build/vash.js`), while in browserland I'll ship builds using browserify and its [standalone flag](https://github.com/substack/node-browserify#usage). I assume those using AMD will be able to consume vash just fine through the use of a shim or configuration. And if browserify is being used by a consumer they'll just be able to `require('vash')` or `require('vash/runtime')` with no configuration required.\r\n\r\n### Helper System / Runtime\r\nThe helper and buffer API will be remaining the same, but I'd like to enable browser builds to just `require('vash/runtime')` followed by `require`ing whatever helpers they actually need. This will likely entail adding a `registerHelper` method to the runtime or something similar. I'm open to ideas! In addition, I'd like to remove the 'masquerading as full vash' the runtime currently does, but not sure if it's possible without large api changes.\r\n\r\n### AST\r\nI know of no tools that rely on vash 0.7's concept of an AST, but if there are, they will be completely broken in 0.8. I've created an [AST format](https://github.com/kirbysayshi/vash/tree/ksh/stated/experiments/stated/nodes) that is much closer to the SpiderMonkey AST format, although simplified and augmented to be able to handle HTML. It's simplified in the sense that vash does not need full JS knowledge. Please let me know if this is a concern for any tools I do not know about.\r\n\r\n### Streaming file support\r\nThis is not implemented yet, but I planned on vash being able to stream a file while parsing / lexing, instead of it's current \"buffer the whole file\" before parsing. The ground work is there, it's more a matter of hooking it up to some actual streaming files and smoothing out the rough edges. Except in cases of very large templates, this is more of a neat feature than a must-have."}}