templatify icon indicating copy to clipboard operation
templatify copied to clipboard

Update for use with browserify v2

Open andyperlitch opened this issue 11 years ago • 4 comments

This is the EXACT middleware I was looking for use with browserify. Only problem is it is not compatible with browserify v2. Any chance of making this change?

Thanks, Andy

andyperlitch avatar Mar 19 '13 00:03 andyperlitch

Been waiting on this to switch to 2 as well. If no one else is on it already, I'll send a PR in a few days.

imlucas avatar Mar 26 '13 19:03 imlucas

Also just came across this https://github.com/epeli/node-hbsfy Compiles HBS, but doesn't do any of the helper detection / declaration like templatify

imlucas avatar Mar 26 '13 19:03 imlucas

One other option is something I did before I found hbsfy. First I created knights-templar which compiles external template files for node. Then I made ktbr, which is a transform that scans for calls to the knights-templar function then inlines the template as a standalone function. I haven't tackled declaration of helpers yet though...

The only advantage to my modules that I can see over hbsfy is that it works on both the server and the browser... Also, as substack pointed out to me, using a require() call to include a template file isn't semantically correct since it isn't an actual js module that is being required.

andyperlitch avatar Mar 26 '13 20:03 andyperlitch

Hi,

I'm open to PR if you still wish to use templatify with browserify v2. I'm not using browserify at the moment so I'm afraid I won't be able to help for the moment.

I created templatify 2 years ago, and admit I don't really remember the codebase now, or the amount of work needed to make it work with browserify v2.

mklabs avatar Jul 04 '14 14:07 mklabs