Skip to content

Commit 4495fe5

Browse files
committed
Remove lodash dependency
1 parent e909c3b commit 4495fe5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var through = require('through2')
22
var postcss = require('postcss')
33
var applySourceMap = require('vinyl-sourcemaps-apply')
4-
var _ = require('lodash')
54

65

76
module.exports = function (processors, options) {
@@ -11,9 +10,19 @@ module.exports = function (processors, options) {
1110
function transform (file, encoding, cb) {
1211

1312
// Source map is inline by default
14-
var opts = _.extend({ map: 'inline' }, options)
13+
var opts = { map: 'inline' }
1514
var processor = postcss()
1615
var result
16+
var attr
17+
18+
// Extend default options
19+
if (options) {
20+
for (attr in options) {
21+
if (options.hasOwnProperty(attr)) {
22+
opts[attr] = options[attr]
23+
}
24+
}
25+
}
1726

1827
if (file.base && file.path) {
1928
opts.from = file.relative

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"homepage": "https://github.com/w0rm/gulp-postcss",
2424
"dependencies": {
2525
"gulp-util": "^3.0.0",
26-
"lodash": "^2.4.1",
2726
"postcss": "^2.1.2",
2827
"through2": "^0.6.1",
2928
"vinyl-sourcemaps-apply": "^0.1.1"

0 commit comments

Comments
 (0)