Skip to content

Commit 7bef5e0

Browse files
authored
Remove gulp-util (#29)
Update nuget packages Update docker container Update tests to latest Nuget standard
1 parent a79b5df commit 7bef5e0

File tree

13 files changed

+2063
-703
lines changed

13 files changed

+2063
-703
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM mono
22

33
RUN nuget update -self
44

5-
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
6-
&& apt-get install -y nodejs
5+
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
6+
7+
RUN apt-get install -y nodejs
78

89
RUN npm install -g gulp mocha
910

lib/pack.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
var cproc = require('child_process');
44
var through = require('through2');
55
var fs = require('fs-extra');
6-
var gutil = require('gulp-util');
6+
var log = require('fancy-log');
7+
var PluginError = require('plugin-error');
78
var argsFor = require('./argsFor');
89
var validFor = require('./validFor');
910
var path = require('path');
@@ -25,12 +26,12 @@ module.exports = function(options) {
2526
var opts = { maxBuffer: options.maxBuffer };
2627

2728
fs.mkdirs(options.outputDirectory, function(err) {
28-
if(err) throw new gutil.PluginError('gulp-nuget', err);
29+
if(err) throw new PluginError('gulp-nuget', err);
2930

3031
cproc.execFile(options.nuget, args, opts, function(err, stdout) {
31-
if(err) throw new gutil.PluginError('gulp-nuget', err);
32-
33-
gutil.log(stdout.trim());
32+
if(err) throw new PluginError('gulp-nuget', err);
33+
34+
log(stdout.trim());
3435

3536
var files = findNupkgs(stdout);
3637
pushFiles.call(self, files, done);
@@ -45,7 +46,7 @@ function pushFiles(files, done) {
4546

4647
files.forEach(function(file, index) {
4748
fs.readFile(file, function(err, data) {
48-
if(err) throw new gutil.PluginError('gulp-nuget', err);
49+
if(err) throw new PluginError('gulp-nuget', err);
4950

5051
self.push(new File({
5152
base: path.dirname(file),
@@ -72,7 +73,7 @@ function findNupkgs(stdout) {
7273
}
7374

7475
if(!matches || !matches.length) {
75-
throw new gutil.PluginError('gulp-nuget', 'Could not detect any output .nupkg files from nuget.');
76+
throw new PluginError('gulp-nuget', 'Could not detect any output .nupkg files from nuget.');
7677
}
7778

7879
return matches;

lib/push.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
var fs = require('fs-extra');
44
var through = require('through2');
55
var cproc = require('child_process');
6-
var gutil = require('gulp-util');
6+
var log = require('fancy-log');
7+
var PluginError = require('plugin-error');
78
var argsFor = require('./argsFor');
89
var validFor = require('./validFor');
910

@@ -37,9 +38,9 @@ function pushToSource(options, file, done) {
3738
var opts = { maxBuffer: options.maxBuffer };
3839

3940
cproc.execFile(options.nuget, args, opts, function(err, stdout) {
40-
if(err) throw new gutil.PluginError('gulp-nuget', err);
41+
if(err) throw new PluginError('gulp-nuget', err);
4142

42-
gutil.log(stdout.trim());
43+
log(stdout.trim());
4344
done(null, file);
4445
});
4546
}

lib/restore.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
var through = require('through2');
44
var cproc = require('child_process');
5-
var gutil = require('gulp-util');
5+
var log = require('fancy-log');
6+
var PluginError = require('plugin-error');
67
var argsFor = require('./argsFor');
78
var validFor = require('./validFor');
89

@@ -20,9 +21,9 @@ module.exports = function(options) {
2021
var opts = { maxBuffer: options.maxBuffer };
2122

2223
cproc.execFile(options.nuget, args, opts, function(err, stdout) {
23-
if(err) throw new gutil.PluginError('gulp-nuget', err);
24+
if(err) throw new PluginError('gulp-nuget', err);
2425

25-
gutil.log(stdout.trim());
26+
log(stdout.trim());
2627
done(null, file);
2728
});
2829

lib/validFor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var gutil = require('gulp-util');
3+
var log = require('fancy-log');
44
var path = require('path');
55

66
exports.pack = function(file) {
@@ -37,7 +37,7 @@ function supported(file, regexp, msg) {
3737
var extension = file.extname || path.extname(file.path);
3838

3939
if(!extension || !extension.match(regexp)) {
40-
gutil.log(file.path + msg);
40+
log(file.path + msg);
4141
return false;
4242
}
4343

0 commit comments

Comments
 (0)