Plugin enabling ASPAX to handle Jade files.
npm install aspax-jade-handlerA plugin that enables ASPAX to handle Jade files.
npm install aspax-jade-handler
If you're running ASPAX in a Node.js application root folder, consider using the --save-dev option to avoid deploying this plugin to your production environment:
npm install aspax-jade-handler --save-dev
.jade source files in aspax.yml: app.js:
- lib.js
- template-1.jade
- template-2.jade
From each Jade source file, the plugin will create a precompiled template function in the global JST namespace, i.e.:
- template-1.jade -> JST['template-1'] = function(...) { ... }
- template-2.jade -> JST['template-2'] = function(...) { ... }
You can use the precompiled templates in your client-side scripts like this:
$('h1').html(JST'template-1');
include statements and automatically trigger ASPAX to rebuild the parent asset if one of the files in your import tree changes.
[npm-image]: https://img.shields.io/npm/v/aspax-jade-handler.svg?style=flat-square
[npm-url]: https://npmjs.org/package/aspax-jade-handler
[david-image]: http://img.shields.io/david/icflorescu/aspax-jade-handler.svg?style=flat-square
[david-url]: https://david-dm.org/icflorescu/aspax-jade-handler
[license-image]: http://img.shields.io/npm/l/aspax-jade-handler.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/aspax-jade-handler.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/aspax-jade-handler