bootstrap-helpers
Install
$ npm install bootstrap-helpers
Usage
The examples here are Express and EJS, but the underlying functions are just string manipulation and are completely template/framework-agnostic. :)
// Express 3app.locals.bootstrap = require("bootstrap-helpers");// Express 2app.helpers("bootstrap", require("bootstrap-helpers")); // view.ejs<%- bootstrap.button("Call to Action", { style: "primary", size: "large"}) %>Call to Action <%- bootstrap.container({ fluid: true }); %> <%- bootstrap.row({ fluid: true }) %> <%- bootstrap.col(4, { tag: "aside" }) %> Sidebar <%- bootstrap.colEnd("aside") %> <%- bootstrap.col(8, { id: "main" }) %> Hello World! <%- bootstrap.colEnd() %> <%- bootstrap.rowEnd() %> <%- bootstrap.containerEnd() %>
Changelog
0.0.1 Initial Release