Skip to content

Commit

Permalink
Merge remote-tracking branch 'prog1dev/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
  • Loading branch information
roman.vasilev committed Oct 13, 2018
2 parents 5ec88e2 + d29729e commit 2e19116
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 6 additions & 5 deletions gulp-cssimport.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var path = require("path");
var deepExtend = require("deep-extend");
var fs = require("fs");
var pify = require("pify");
var gutil = require("gulp-util");
var Vinyl = require("vinyl");
var PluginError = require("plugin-error");
var collect = require("collect-stream");
var hh = require("http-https");
var minimatch = require("minimatch");
Expand Down Expand Up @@ -100,7 +101,7 @@ module.exports = function cssImport(options) {
var importFile = resolveImportFile(pathDirectory, importPath, options.includePaths);
if (!importFile) {
var err = new Error("Cannot find file '" + importPath + "' from '" + pathDirectory + "' (includePaths: " + options.includePaths + ")");
callback(new gutil.PluginError(PLUGIN_NAME, err));
callback(new PluginError(PLUGIN_NAME, err));
}
promises[promises.length] = readFile(importFile, "utf8").then(function(contents) {
result.importFile = importFile;
Expand Down Expand Up @@ -138,7 +139,7 @@ module.exports = function cssImport(options) {
var result = results[i];
// Strip BOM.
result.contents = stripBom(result.contents);
var vfile = new gutil.File({
var vfile = new Vinyl({
path: result.importFile,
contents: new Buffer(result.contents)
});
Expand Down Expand Up @@ -181,7 +182,7 @@ module.exports = function cssImport(options) {
callback(null, vinyl);
})
.catch(function(err) {
callback(new gutil.PluginError(PLUGIN_NAME, err));
callback(new PluginError(PLUGIN_NAME, err));
});
}

Expand Down Expand Up @@ -264,4 +265,4 @@ function isUrl(s) {
function getExtension(p) {
p = String(p);
return p.substr(p.lastIndexOf('.') + 1);
}
}
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var gulp = require("gulp");
var gutil = require("gulp-util");
var g = require("gulp-load-plugins")();
var argv = require('minimist')(process.argv.slice(2));

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

gulp.task("bump", function() {
var argv = gutil.env;
var options = {
type: "patch"
};
Expand All @@ -26,4 +26,4 @@ gulp.task("bump", function() {
.pipe(g.bump(options))
.pipe(gulp.dest("./"));
});
});
});
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
],
"dependencies": {
"collect-stream": "^1.2.1",
"deep-extend": "^0.6.0",
"gulp-util": "*",
"deep-extend": "^0.5.0",
"plugin-error": "^0.1.2",
"minimist": "^1.2.0",
"vinyl": "^2.1.0",
"http-https": "^1.0.0",
"lodash.trim": "^4.5.1",
"lookup-path": "^0.3.1",
Expand Down

0 comments on commit 2e19116

Please sign in to comment.