jade2js
Compile jade into js functions served as one file
Last updated 4 years ago by slava.ganzin .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jade2js 
SYNC missed versions from official npm registry.

Compile jade into js functions served as one file

  $ jade2js path/to/templates path/to/result.js [--no-debug]
  

in html:

  <script src=/templates.js/>
  <script>
    render.*YourTemplateFilename*(variables)
  </script>

All your script tags would be cut from jade template and moved into result.js file as IIFE So you can use it to declare template specific code as:

  #myAwesomeSelector Hello World
  script
    - alert($('#myAwesomeSelector').val())

Jade generate a lot of debug information to help you debug your code. And it looks a bit messy, so for production use --no-debug or -D

Current Tags

  • 0.1.0                                ...           latest (4 years ago)

8 Versions

  • 0.1.0                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 8
Dependencies (4)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |