{"action":"created","issue":{"url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/233","labels_url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/233/comments","events_url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/233/events","html_url":"https://github.com/pattern-lab/patternlab-node/pull/233","id":126271108,"number":233,"title":"Pattern engines ongoing work, round 5 (I think)","user":{"login":"geoffp","id":76232,"avatar_url":"https://avatars.githubusercontent.com/u/76232?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffp","html_url":"https://github.com/geoffp","followers_url":"https://api.github.com/users/geoffp/followers","following_url":"https://api.github.com/users/geoffp/following{/other_user}","gists_url":"https://api.github.com/users/geoffp/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffp/subscriptions","organizations_url":"https://api.github.com/users/geoffp/orgs","repos_url":"https://api.github.com/users/geoffp/repos","events_url":"https://api.github.com/users/geoffp/events{/privacy}","received_events_url":"https://api.github.com/users/geoffp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T20:43:16Z","updated_at":"2016-01-13T13:29:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pattern-lab/patternlab-node/pulls/233","html_url":"https://github.com/pattern-lab/patternlab-node/pull/233","diff_url":"https://github.com/pattern-lab/patternlab-node/pull/233.diff","patch_url":"https://github.com/pattern-lab/patternlab-node/pull/233.patch"},"body":"Happy New Year! I feel this work is getting very close to stable at this point. I mean, it passes the tests, what more do you want?\r\n\r\nActually, the latest merge from the dev branch was a big one, and nicely exposed some Mustache-specific code still in the lineage hunter. I factored it out, and then moved it into the engines -- only to find that it was duplicating a function already present in the engines! The \"old\" version extracted from the lineage hunter was passing more tests than the \"new\" one, so at least for the Mustache engine, the old one wins.\r\n\r\nMore notable stuff:\r\n* More file-based unit tests for Handlebars -- these test that the JSON data environment for Handlebars partials is correct.\r\n* One bug I had after the merge was that the processing of style modifiers and pattern parameters was breaking Handlebars in certain cases. There was a big chunk of `processPatternRecursive()` that was doing only this, [so this was factored out](https://github.com/geoffp/patternlab-node/commit/724396735eeb20c21ddc582094cc7d1786959618) into an `expandPartials()` function (in the same file) that is only executed if the engine of the currently in-process pattern has an `expandPartials` flag set to `true`. I broadly like the extraction of that function, because it makes `processPatternRecursive()` shorter and easier to understand, however:\r\n * Even though this makes everything work for now, I'm not happy with it -- I think the cleanest solution is different, and I don't want to have to put a flag into engines that is rarely used and may be confusing to authors.\r\n * I think we've talked about this before, but it does seem to me like the `expandPartials()` functionality really belongs in the Mustache engine, since style modifiers and pattern parameters amount to Mustache-specific syntax extensions. They don't seem necessary in Handlebars, anyway, because Handlebars is already rich with argument-passing features. Doesn't it seem kind of fun that PL has its own dialect of Mustache? Pattern-lab flavored Mustache! Milk Mustache? There has to be a joke in there somewhere.\r\n\r\nAs always, I look forward to your thoughts!\r\n\r\n### TODO\r\n- [ ] don't execute Handlebars unit tests unless handlebars is installed via npm\r\n- [ ] await @bmuenzenmeyer's feedback on moving params/stylemodifiers into Mustache plugin"},"comment":{"url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/comments/171289969","html_url":"https://github.com/pattern-lab/patternlab-node/pull/233#issuecomment-171289969","issue_url":"https://api.github.com/repos/pattern-lab/patternlab-node/issues/233","id":171289969,"user":{"login":"bmuenzenmeyer","id":298435,"avatar_url":"https://avatars.githubusercontent.com/u/298435?v=3","gravatar_id":"","url":"https://api.github.com/users/bmuenzenmeyer","html_url":"https://github.com/bmuenzenmeyer","followers_url":"https://api.github.com/users/bmuenzenmeyer/followers","following_url":"https://api.github.com/users/bmuenzenmeyer/following{/other_user}","gists_url":"https://api.github.com/users/bmuenzenmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/bmuenzenmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmuenzenmeyer/subscriptions","organizations_url":"https://api.github.com/users/bmuenzenmeyer/orgs","repos_url":"https://api.github.com/users/bmuenzenmeyer/repos","events_url":"https://api.github.com/users/bmuenzenmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/bmuenzenmeyer/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T13:29:42Z","updated_at":"2016-01-13T13:29:42Z","body":"@geoffp dumb question incoming\r\n\r\nThis completely ignores any work we are doing in `dev` with configurable paths, yes?"}}