Skip to content

Commit 2e19116

Browse files
author
roman.vasilev
committed
Merge remote-tracking branch 'prog1dev/master'
# Conflicts: # package.json
2 parents 5ec88e2 + d29729e commit 2e19116

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

gulp-cssimport.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ var path = require("path");
44
var deepExtend = require("deep-extend");
55
var fs = require("fs");
66
var pify = require("pify");
7-
var gutil = require("gulp-util");
7+
var Vinyl = require("vinyl");
8+
var PluginError = require("plugin-error");
89
var collect = require("collect-stream");
910
var hh = require("http-https");
1011
var minimatch = require("minimatch");
@@ -100,7 +101,7 @@ module.exports = function cssImport(options) {
100101
var importFile = resolveImportFile(pathDirectory, importPath, options.includePaths);
101102
if (!importFile) {
102103
var err = new Error("Cannot find file '" + importPath + "' from '" + pathDirectory + "' (includePaths: " + options.includePaths + ")");
103-
callback(new gutil.PluginError(PLUGIN_NAME, err));
104+
callback(new PluginError(PLUGIN_NAME, err));
104105
}
105106
promises[promises.length] = readFile(importFile, "utf8").then(function(contents) {
106107
result.importFile = importFile;
@@ -138,7 +139,7 @@ module.exports = function cssImport(options) {
138139
var result = results[i];
139140
// Strip BOM.
140141
result.contents = stripBom(result.contents);
141-
var vfile = new gutil.File({
142+
var vfile = new Vinyl({
142143
path: result.importFile,
143144
contents: new Buffer(result.contents)
144145
});
@@ -181,7 +182,7 @@ module.exports = function cssImport(options) {
181182
callback(null, vinyl);
182183
})
183184
.catch(function(err) {
184-
callback(new gutil.PluginError(PLUGIN_NAME, err));
185+
callback(new PluginError(PLUGIN_NAME, err));
185186
});
186187
}
187188

@@ -264,4 +265,4 @@ function isUrl(s) {
264265
function getExtension(p) {
265266
p = String(p);
266267
return p.substr(p.lastIndexOf('.') + 1);
267-
}
268+
}

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var gulp = require("gulp");
22
var gutil = require("gulp-util");
33
var g = require("gulp-load-plugins")();
4+
var argv = require('minimist')(process.argv.slice(2));
45

56
gulp.task("watch-eslint", ["eslint"], function() {
67
gulp.watch(["./gulp-cssimport.js"], ["eslint"]);
@@ -15,7 +16,6 @@ gulp.task("eslint", function() {
1516
});
1617

1718
gulp.task("bump", function() {
18-
var argv = gutil.env;
1919
var options = {
2020
type: "patch"
2121
};
@@ -26,4 +26,4 @@ gulp.task("bump", function() {
2626
.pipe(g.bump(options))
2727
.pipe(gulp.dest("./"));
2828
});
29-
});
29+
});

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
],
1919
"dependencies": {
2020
"collect-stream": "^1.2.1",
21-
"deep-extend": "^0.6.0",
22-
"gulp-util": "*",
21+
"deep-extend": "^0.5.0",
22+
"plugin-error": "^0.1.2",
23+
"minimist": "^1.2.0",
24+
"vinyl": "^2.1.0",
2325
"http-https": "^1.0.0",
2426
"lodash.trim": "^4.5.1",
2527
"lookup-path": "^0.3.1",

0 commit comments

Comments
 (0)