Skip to content

Commit

Permalink
Remove gulp-util
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlacy committed Dec 25, 2017
1 parent dd37ea2 commit f58e0f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var path = require('path');
var accord = require('accord');
var through2 = require('through2');
var gutil = require('gulp-util');
var replaceExt = require('replace-ext');
var assign = require('object-assign');
var applySourceMap = require('vinyl-sourcemaps-apply');
var PluginError = require('plugin-error');

var PluginError = gutil.PluginError;
var less = accord.load('less');

module.exports = function (options) {
Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = function (options) {

less.render(str, opts).then(function(res) {
file.contents = new Buffer(res.result);
file.path = gutil.replaceExtension(file.path, '.css');
file.path = replaceExt(file.path, '.css');
if (res.sourcemap) {
res.sourcemap.file = file.relative;
res.sourcemap.sources = res.sourcemap.sources.map(function (source) {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
"license": "MIT",
"dependencies": {
"accord": "^0.27.3",
"gulp-util": "^3.0.7",
"less": "2.6.x || ^2.7.1",
"object-assign": "^4.0.1",
"plugin-error": "^0.1.2",
"replace-ext": "^1.0.0",
"through2": "^2.0.0",
"vinyl-sourcemaps-apply": "^0.2.0"
},
"devDependencies": {
"jshint": "^2.9.4",
"mocha": "^3.4.2",
"should": "^11.2.0"
"should": "^11.2.0",
"vinyl": "^2.1.0"
}
}
4 changes: 2 additions & 2 deletions test/main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
var should = require('should');
var less = require('../');
var gutil = require('gulp-util');
var File = require('vinyl')
var fs = require('fs');
var pj = require('path').join;

function createVinyl(lessFileName, contents) {
var base = pj(__dirname, 'fixtures');
var filePath = pj(base, lessFileName);

return new gutil.File({
return new File({
cwd: __dirname,
base: base,
path: filePath,
Expand Down

0 comments on commit f58e0f7

Please sign in to comment.