wisdom

asset-aware DOM generation for node.js

npm install wisdom
2 downloads in the last week
8 downloads in the last month

wisdom

asset-aware DOM generation for node.js

install

npm i wisdom

demo

JavaScript

// TODO

CoffeeScript

wisdom = require 'wisdom'

app = express()

dom = wisdom app
dom.use 'browserid'
dom.use 'jquery'
dom.use 'bootstrap'
dom.use 'socket.io'
dom.use 'browserify'

app.get '/', dom.middleware, (req, res) ->
  res.send req.dom.html

result

<html>
  <head>
    <title></title>

    <script src="https://browserid.org/include.js"></script>

    <script src="http://code.jquery.com/jquery.js"></script>

    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-alert.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-button.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-collapse.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-typeahead.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-popover.js"></script>

    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" />
    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" />

    <script src="/socket.io/socket.io.js"></script>

    <script src="/browserify.js"></script>
  </head>

  <body>
  </body>
</html>
npm loves you