{"_id":"tplcpl","_rev":"25-a2108f07d58ff54ba79739e395132315","name":"tplcpl","description":"Templates Compiler","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"tplcpl","description":"Templates Compiler","version":"0.0.1","author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl.git"},"bin":{"tplcpl":"./app/cpl.js"},"dependencies":{"jade":"*","underscore":"*","commander":"*"},"engines":{"node":">= 0.4.0"},"preferGlobal":true,"_npmJsonOpts":{"file":"/home/dude/.npm/tplcpl/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"tplcpl@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"ceddc49e0733e4a33c1c804ec5008ec9262b184d","tarball":"https://registry.npmjs.org/tplcpl/-/tplcpl-0.0.1.tgz","integrity":"sha512-5v2by8k7UCBYeCyWplU8qa1ZuuuYWUFC5uciFGSUC2lo+FPliLbthMhQvcy57QLIKTXrrQRMPSc9ov14K1F3OA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX5VB1xpOP5UXNs5hr+Kcq60y9+No4oBcpBayyS8QSbQIhALS/FS5/0qH/9T66wMlNw5M8+GaXurU9cVuhnNaRJUor"}]},"scripts":{},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}],"directories":{}},"0.0.2":{"name":"tplcpl","description":"Templates Compiler","version":"0.0.2","author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl.git"},"bin":{"tplcpl":"./app/cpl.js"},"dependencies":{"jade":"*","underscore":"*","commander":"*"},"engines":{"node":">= 0.4.0"},"preferGlobal":true,"_npmJsonOpts":{"file":"/home/dude/.npm/tplcpl/0.0.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"tplcpl@0.0.2","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"2df77001971903f5ad4e025ab44bc2dfeb037fa6","tarball":"https://registry.npmjs.org/tplcpl/-/tplcpl-0.0.2.tgz","integrity":"sha512-DIZJ0f92UkrZ10MfEXS1uecTOTi6zJ2HBq4LdVsW+D8TfAau/1Es+I6PoIbnQKjZIcH++ARwINq8HRV1e0zsBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICV4D1vd8osCo1Ow3+tb5OqAGZpPJmwXSHryE9TR6YDQAiBdNJMXZaTKl6v7t4pvUjbcbr87cG3hkWBAyVHnW7sJvA=="}]},"scripts":{},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}],"directories":{}},"0.0.3":{"name":"tplcpl","description":"Templates Compiler","version":"0.0.3","author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl.git"},"bin":{"tplcpl":"./app/cpl.js"},"dependencies":{"jade":"*","underscore":"*","commander":"*"},"engines":{"node":">= 0.4.0"},"preferGlobal":true,"_npmJsonOpts":{"file":"/home/dude/.npm/tplcpl/0.0.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"tplcpl@0.0.3","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"b4dc5db0bd6fa7d6607bd2f481adbaa7e448e134","tarball":"https://registry.npmjs.org/tplcpl/-/tplcpl-0.0.3.tgz","integrity":"sha512-O97XaQX22XN6wKfgMCrTWmRhY/LaJvyq+VekX9VLzwjFCi4E8wiWGKp6H7wZjelvRU6+Mj0a9S8Mmq+qmMvEDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsl6H8FPVaqfLSFfKoWu1HUSYH+RE7FlS1o3danCz+vgIhAPYA8+kuVkzAvrJKv9moRp+S+VB2O6sgGwcBqAHQgtr1"}]},"scripts":{},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}],"directories":{}},"0.0.4":{"name":"tplcpl","description":"Templates Compiler","version":"0.0.4","author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl"},"bin":{"tplcpl":"./app/cpl.js"},"dependencies":{"jade":"*","underscore":"*","commander":"*","uglify-js":"*"},"engines":{"node":">= 0.4.0"},"preferGlobal":true,"readme":"## TplCpl - templates compiler\n\nThis is a command-line utility to compile javascript templates (currently Jade and Underscore) for use client-side.\n\nTplCpl compiles a whole directory of your project's templates into single JS-file and optionally minifies them with Uglify.js.\n\n\n### Using compiler\n\n#### Under Linux:\n\nInstall TplCpl from npm:\n\n\n```\nsudo -g npm install tplcpl\n\ntplcpl --help\n```\n\nGlobal (`-g`) installation is preferred to use the command line tool.\n\nUsage:\n\n```\ntplcpl -t path/to/templates -o path/to/templates.js -c\n```\n\nYou have to pass `-t` and `-o` options - templates directory and output JS-file respectively.\n`-c` option means \"compress\" - minify output file with Uglify.js.\n\nDuring compilation a directory is traversed recursively.\n\nTemplate engine to compile with is chosen by file's extension.\n\nJade templates must have `.jade` extension, underscore templates - `.us` extension.\n\n#### Under Windows:\n\nDownload and run [tplcpl-setup.exe](https://github.com/downloads/jsmarkus/tplcpl/tplcpl-setup.exe) Windows installer\n\nTplCpl is installed to C:\\tplcpl.\n\n\n```\nC:\\tplcpl\\bin\\tplcpl -t path\\to\\templates -o path\\to\\templates.js -c\n```\n\nUnder windows please avoid spaces in paths.\n\n### Using compiled templates\n\nAfter templates are compiled, they may be used as following:\n\n```\nvar html = Templating.tpl('my/template.jade', {foo:'bar'});\nconsole.log(html);\n```\n\nA Templating namespace provides also a convenient way to add `tpl()` helper to your javascript \"class\".\n\nSuppose we have an OOP module like this:\n\n```\nvar MyModule = function () {\n\n};\nMyModule.prototype.myMethod = function () {\n\n};\n\n//etc...\n```\n\nThen we make:\n\n```\nTemplating.enable(MyModule);\n```\n\nNow instances of MyModule will have a `tpl()` method:\n\n```\nvar inst = new MyModule;\nvar h = inst.tpl('my/template.jade', {foo:'bar'});\n```\n\nSince `tpl()` is added with `Templating.enable`, templates rendering functions are bound to the calling object.\n\nSo in your jade or underscore templates you can use `this` variable referring to the object that calls `tpl()`.\n\n\n### Underscore extension\n\nThere is a missing feature in Underscore templates - an escaping.\n\nSo it is added here.\n\nNow\n\n```\n<%=variable%>\n```\nis used to escape special characters in a variable.\n\nTo show variable without escaping you should use:\n\n```\n<%-variable%>\n```\n\n### Collaboration\n\nI have written TplCpl for private use, so it is not a universal tool.\n\nFeel free to fork it or submit an issue if you want to add any missing features.\n","_id":"tplcpl@0.0.4","dist":{"shasum":"f9bf3896cf3a7981506e7027b5aa1e7562048088","tarball":"https://registry.npmjs.org/tplcpl/-/tplcpl-0.0.4.tgz","integrity":"sha512-X9T736H/Zdao2bWZT9K32DN75OG0t35GXhEo7bWEvKvzVLd4m+k8+koRJDzUHJv2yqi0EOuAlSM0fJZGXNqPZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCZD51EXGyLN4rjWWlFkf8yZKx879rIgvzT6CdaplsGAiEAu5PagA0LP1c2Bh/+4Cx/jOekRtkny+zeA302FJiLR5k="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"jsmarkus","email":"nixmrak@gmail.com"},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}]},"0.0.5":{"name":"tplcpl","description":"Templates Compiler","version":"0.0.5","author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl"},"bin":{"tplcpl":"./app/cpl.js"},"dependencies":{"jade":"*","underscore":"*","commander":"*","uglify-js":"*"},"engines":{"node":">= 0.4.0"},"preferGlobal":true,"readme":"## TplCpl - templates compiler\n\nThis is a command-line utility to compile javascript templates (currently Jade and Underscore) for use client-side.\n\nTplCpl compiles a whole directory of your project's templates into single JS-file and optionally minifies them with Uglify.js.\n\n\n### Using compiler\n\n#### Under Linux:\n\nInstall TplCpl from npm:\n\n\n```\nsudo -g npm install tplcpl\n\ntplcpl --help\n```\n\nGlobal (`-g`) installation is preferred to use the command line tool.\n\nUsage:\n\n```\ntplcpl -t path/to/templates -o path/to/templates.js -c\n```\n\nYou have to pass `-t` and `-o` options - templates directory and output JS-file respectively.\n`-c` option means \"compress\" - minify output file with Uglify.js.\n\nDuring compilation a directory is traversed recursively.\n\nTemplate engine to compile with is chosen by file's extension.\n\nJade templates must have `.jade` extension, underscore templates - `.us` extension.\n\n#### Under Windows:\n\nDownload and run [tplcpl-setup.exe](https://github.com/downloads/jsmarkus/tplcpl/tplcpl-setup.exe) Windows installer\n\nTplCpl is installed to C:\\tplcpl.\n\n\n```\nC:\\tplcpl\\bin\\tplcpl -t path\\to\\templates -o path\\to\\templates.js -c\n```\n\nUnder windows please avoid spaces in paths.\n\n### Using compiled templates\n\nAfter templates are compiled, they may be used as following:\n\n```\nvar html = Templating.tpl('my/template.jade', {foo:'bar'});\nconsole.log(html);\n```\n\nA Templating namespace provides also a convenient way to add `tpl()` helper to your javascript \"class\".\n\nSuppose we have an OOP module like this:\n\n```\nvar MyModule = function () {\n\n};\nMyModule.prototype.myMethod = function () {\n\n};\n\n//etc...\n```\n\nThen we make:\n\n```\nTemplating.enable(MyModule);\n```\n\nNow instances of MyModule will have a `tpl()` method:\n\n```\nvar inst = new MyModule;\nvar h = inst.tpl('my/template.jade', {foo:'bar'});\n```\n\nSince `tpl()` is added with `Templating.enable`, templates rendering functions are bound to the calling object.\n\nSo in your jade or underscore templates you can use `this` variable referring to the object that calls `tpl()`.\n\n\n### Underscore extension\n\nThere is a missing feature in Underscore templates - an escaping.\n\nSo it is added here.\n\nNow\n\n```\n<%=variable%>\n```\nis used to escape special characters in a variable.\n\nTo show variable without escaping you should use:\n\n```\n<%-variable%>\n```\n\n### Collaboration\n\nI have written TplCpl for private use, so it is not a universal tool.\n\nFeel free to fork it or submit an issue if you want to add any missing features.\n","_id":"tplcpl@0.0.5","dist":{"shasum":"4af27e93184e4d2abbb920d57950f883547ad7bf","tarball":"https://registry.npmjs.org/tplcpl/-/tplcpl-0.0.5.tgz","integrity":"sha512-BeRzBmCLTiu8S+iFYoWDmbMnhOhDmMl30RbXEA1mJ2208ZameYG7+6KBLVWvw2T2cWGkrf6DCdV9MGggsdc2ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEE5UmU2G1XE60zmyxZyxUYmXmoz0wO1rm1UX2o/s5X/AiAlrhRDqhePgdmOghQgx3I7Q9/E0d7Ekliw5fq8wVeI0Q=="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"jsmarkus","email":"nixmrak@gmail.com"},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}]}},"maintainers":[{"name":"jsmarkus","email":"nixmrak@gmail.com"}],"time":{"modified":"2022-06-27T19:25:43.598Z","created":"2011-09-14T11:06:42.693Z","0.0.1":"2011-09-14T11:06:44.512Z","0.0.2":"2011-09-14T11:09:30.744Z","0.0.3":"2011-09-20T09:06:51.761Z","0.0.4":"2013-02-04T08:38:05.043Z","0.0.5":"2013-02-08T07:37:35.468Z"},"author":{"name":"Markus"},"repository":{"type":"git","url":"git://github.com/jsmarkus/tplcpl"}}