browserify-css
Advanced tools
Comparing version 0.2.2 to 0.3.0
12
index.js
@@ -26,7 +26,11 @@ 'use strict'; | ||
var base = path.relative(__dirname, process.cwd()); | ||
options = require(path.join(base, options)) || {}; | ||
try { | ||
options = require(path.join(base, options)) || defaults; | ||
} catch (err) { | ||
options = defaults; | ||
} | ||
} | ||
options = _.defaults(options || {}, defaults); | ||
options = _.defaults(options, defaults); | ||
module.exports = function(filename) { | ||
module.exports = function(filename, opts) { | ||
if ( ! /\.css$/i.test(filename)) { | ||
@@ -40,2 +44,4 @@ return through(); | ||
options = _.extend({}, options, opts); | ||
return through( | ||
@@ -42,0 +48,0 @@ function transform(chunk, enc, next) { |
{ | ||
"name": "browserify-css", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "A Browserify transform for bundling, rebasing, inlining, and minifying CSS files", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
19031
17
347