Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Jspp: A JavaScript Pre-Processor (jspp.io)
20 points by necolas on Jan 3, 2011 | hide | past | favorite | 5 comments



The tagline (tag-paragraph?) is a little opaque:

A simple way to build web applications with embedded server side JavaScript. In a few minutes you can build dynamic backend logic in to any page (html, css, etc) using node.js, jQuery and server side DOM with php-like embedded code.

Having read through the rest of the page, I'd rewrite it like this:

A way to embed server-side JavaScript into HTML and CSS files. JSPP uses PHP-like template tags and gives you access to jQuery and node.js modules.


It actually works with any file, it's just that HTML files get a DOM and jQuery to help you manipulate the page.

It's conceivable to add additional tools in the future (YUI, dojo) and even maybe some tools specific to help creating css.

Having the filesystem be the API makes the caching semantics quite nice and extensible.


dildos


    <html>
      <body>
        <div class="test1">
          <pre>
          <?jspp
          dicks = require("dicks").dicksSync(10)
          $(this).html( dicks.join("\n") )
          end()
          ?>
          </pre>
        </div>
        </body>
    </html>


wtf?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: