1

I decided to play a bit with Node.js because I like Javascript a lot as a language and because V8 is so fast. I work with mobile sites a so if I manage to reduce the page response time it will be very good.

I have a relatively simple site built with php and smarty and as an exercise I want to port it to Node and see how it behaves.

My main problem is the following - which of the existing template engines most closely resemble smarty so the porting work of this part of the project to be minimized.

Also I use php library that combines content images into sprites - any image processing tools for V8 that can read/write png and jpeg?

Daniel Iankov
  • 306
  • 3
  • 7

2 Answers2

5

Recently published Node.js Smarty template engine - ported PHP Smarty

https://github.com/stepofweb/nsmarty

  • That repository has been not updated since long. It has lot of bugs which are still present in original library it was forked from. I have forked the original library and added many bug fixes into it. Can be found at https://npmjs.org/package/jsmart or https://github.com/umakantp/jsmart/ – Umakant Patil Dec 20 '13 at 07:47
2

When I search for modules I like to use http://search.npmjs.org and https://github.com/joyent/node/wiki/modules.

I have never used Smarty, but maybe ejs could be useful? There is a node.js plugin for ejs available. Also maybe you should have a look at all templates modules available at https://github.com/joyent/node/wiki/modules#wiki-templating.

I searched search.npmjs.org and https://github.com/joyent/node/wiki/modules for png:

Alfred
  • 60,935
  • 33
  • 147
  • 186