0.1.4 • Published 10 years ago

bower-to-locals v0.1.4

Weekly downloads
38
License
-
Repository
github
Last release
10 years ago

bowerToLocals

A simple middleware to select all Bower main files and saves them into the response.locals Object.

Install

npm install bower-to-locals

How to use

var express = require('express');
var app = express();

require('bower-to-locals').init(app);

To see all the current seleced files:

var express = require('express');
var app = express();
var bowerToLocals = require('bower-to-locals');
bowerToLocals.init(app);
 
if(app.env === 'development'){
  console.log(bowerToLocals.list());
}
 ---- start section bower-to-locals ----
bootstrap.less
bootstrap.css
bootstrap.js
bootstrap.eot
bootstrap.svg
bootstrap.ttf
bootstrap.woff
jquery
---- end section ----

In a jade file for example:

script(src=jquery)
script(src=bootstrap.js)

Minify

Js

To minify js just call minify after init

var express = require('express');
var app = express();
var bowerToLocals = require('bower-to-locals');
bowerToLocals.init(app);
bowerToLocals.minify();
0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago