Skip to content

Commit 056b298

Browse files
committedDec 4, 2019
chore: release v2.0.0
1 parent ca50853 commit 056b298

11 files changed

+160
-189
lines changed
 

‎.jscsrc

-13
This file was deleted.

‎.jshintrc

-21
This file was deleted.

‎.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: node_js
22
node_js:
3+
- '12'
4+
- '11'
35
- '10'
46
- '9'
57
- '8'

‎CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# v2.0.0
2+
3+
#### Breaking
4+
5+
- Add the ability to use the function argument as an immutable map function (This may be breaking for users who were relying on the return value of the function being ignored)
6+
7+
#### Chores
8+
9+
- Update deps
10+
- Switch from JSCS/JSHint to Prettier

‎index.js

+14-17
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,54 @@ var Stream = require('stream');
44
var Path = require('path');
55

66
function gulpRename(obj, options) {
7-
87
options = options || {};
98

10-
var stream = new Stream.Transform({objectMode: true});
9+
var stream = new Stream.Transform({ objectMode: true });
1110

1211
function parsePath(path) {
13-
var extname = options.multiExt ? Path.basename(path).slice(Path.basename(path).indexOf('.')) : Path.extname(path);
12+
var extname = options.multiExt
13+
? Path.basename(path).slice(Path.basename(path).indexOf('.'))
14+
: Path.extname(path);
1415
return {
1516
dirname: Path.dirname(path),
1617
basename: Path.basename(path, extname),
1718
extname: extname
1819
};
1920
}
2021

21-
stream._transform = function (originalFile, unused, callback) {
22-
23-
24-
var file = originalFile.clone({contents: false});
22+
stream._transform = function(originalFile, unused, callback) {
23+
var file = originalFile.clone({ contents: false });
2524
var parsedPath = parsePath(file.relative);
2625
var path;
2726

2827
var type = typeof obj;
2928

3029
if (type === 'string' && obj !== '') {
31-
3230
path = obj;
33-
3431
} else if (type === 'function') {
35-
3632
let newParsedPath = obj(parsedPath, file);
3733
if (typeof newParsedPath === 'object' && newParsedPath !== null) {
3834
parsedPath = newParsedPath;
3935
}
40-
41-
path = Path.join(parsedPath.dirname, parsedPath.basename + parsedPath.extname);
4236

37+
path = Path.join(
38+
parsedPath.dirname,
39+
parsedPath.basename + parsedPath.extname
40+
);
4341
} else if (type === 'object' && obj !== undefined && obj !== null) {
44-
4542
var dirname = 'dirname' in obj ? obj.dirname : parsedPath.dirname,
4643
prefix = obj.prefix || '',
4744
suffix = obj.suffix || '',
4845
basename = 'basename' in obj ? obj.basename : parsedPath.basename,
4946
extname = 'extname' in obj ? obj.extname : parsedPath.extname;
5047

5148
path = Path.join(dirname, prefix + basename + suffix + extname);
52-
5349
} else {
54-
55-
callback(new Error('Unsupported renaming parameter type supplied'), undefined);
50+
callback(
51+
new Error('Unsupported renaming parameter type supplied'),
52+
undefined
53+
);
5654
return;
57-
5855
}
5956

6057
file.path = Path.join(file.base, path);

‎package.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-rename",
3-
"version": "1.4.0",
3+
"version": "2.0.0",
44
"description": "Rename files",
55
"keywords": [
66
"gulpplugin"
@@ -21,17 +21,16 @@
2121
"url": "git://github.com/hparra/gulp-rename.git"
2222
},
2323
"scripts": {
24-
"pretest": "jscs index.js test/ && jshint index.js test/",
24+
"pretest": "prettier --single-quote --write index.js test/**/*.js",
2525
"test": "mocha"
2626
},
2727
"devDependencies": {
28-
"gulp": "^4.0.0",
29-
"gulp-sourcemaps": "^2.6.4",
30-
"jscs": "^3.0.0",
31-
"jshint": "^2.0.0",
28+
"gulp": "^4.0.2",
29+
"gulp-sourcemaps": "^2.6.5",
3230
"map-stream": "^0.0.7",
33-
"mocha": "^5.0.0",
34-
"should": "^13.0.0",
31+
"mocha": "^6.0.0",
32+
"prettier": "^1.19.1",
33+
"should": "^13.2.3",
3534
"vinyl": "^2.0.0"
3635
},
3736
"engines": {

‎test/.jshintrc

-4
This file was deleted.

‎test/path-parsing.spec.js

+47-42
Original file line numberDiff line numberDiff line change
@@ -4,129 +4,134 @@
44
require('./spec-helper');
55
var Path = require('path');
66

7-
describe('gulp-rename path parsing', function () {
8-
describe('dirname', function () {
9-
context('when src pattern contains no globs', function () {
10-
it('dirname is \'.\'', function (done) {
7+
describe('gulp-rename path parsing', function() {
8+
describe('dirname', function() {
9+
context('when src pattern contains no globs', function() {
10+
it("dirname is '.'", function(done) {
1111
var srcPattern = 'test/fixtures/hello.txt';
12-
var obj = function (path) {
12+
var obj = function(path) {
1313
path.dirname.should.equal('.');
1414
};
1515
helper(srcPattern, obj, null, done);
1616
});
1717
});
1818

19-
context('when src pattern contains filename glob', function () {
20-
it('dirname is \'.\'', function (done) {
19+
context('when src pattern contains filename glob', function() {
20+
it("dirname is '.'", function(done) {
2121
var srcPattern = 'test/fixtures/*.min.txt';
22-
var obj = function (path) {
22+
var obj = function(path) {
2323
path.dirname.should.equal('.');
2424
};
2525
helper(srcPattern, obj, null, done);
2626
});
2727
});
2828

29-
var dirnameHelper = function (srcPattern) {
30-
it('dirname is path from directory glob to file', function (done) {
31-
var obj = function (path) {
29+
var dirnameHelper = function(srcPattern) {
30+
it('dirname is path from directory glob to file', function(done) {
31+
var obj = function(path) {
3232
path.dirname.should.match(/^fixtures[0-9]?$/);
3333
};
3434
helper(srcPattern, obj, null, done);
3535
});
3636
};
3737

38-
context('when src pattern matches a directory with *', function () {
38+
context('when src pattern matches a directory with *', function() {
3939
dirnameHelper('test/*/*.min.txt');
4040
});
4141

42-
context('when src pattern matches a directory with **', function () {
42+
context('when src pattern matches a directory with **', function() {
4343
dirnameHelper('test/**/*.min.txt');
4444
});
4545

46-
context('when src pattern matches a directory with [...]', function () {
46+
context('when src pattern matches a directory with [...]', function() {
4747
dirnameHelper('test/fixt[a-z]res/*.min.txt');
4848
});
4949

50-
context('when src pattern matches a directory with {...,...}', function () {
50+
context('when src pattern matches a directory with {...,...}', function() {
5151
dirnameHelper('test/f{ri,ixtur}es/*.min.txt');
5252
});
5353

5454
/* SKIP: glob2base does not handle brace expansion as expected. See wearefractal/glob2base#1 */
55-
context.skip('when src pattern matches a directory with {#..#}', function () {
56-
dirnameHelper('test/fixtures{0..9}/*.min.txt');
57-
});
58-
59-
context('when src pattern matches a directory with an extglob', function () {
55+
context.skip(
56+
'when src pattern matches a directory with {#..#}',
57+
function() {
58+
dirnameHelper('test/fixtures{0..9}/*.min.txt');
59+
}
60+
);
61+
62+
context('when src pattern matches a directory with an extglob', function() {
6063
dirnameHelper('test/f+(ri|ixtur)es/*.min.txt');
6164
});
6265

63-
context('when src pattern includes `base` option', function () {
64-
it('dirname is path from given directory to file', function (done) {
66+
context('when src pattern includes `base` option', function() {
67+
it('dirname is path from given directory to file', function(done) {
6568
var srcPattern = 'test/**/*.min.txt';
66-
var srcOptions = {base: process.cwd()};
67-
var obj = function (path) {
69+
var srcOptions = { base: process.cwd() };
70+
var obj = function(path) {
6871
path.dirname.should.equal(Path.join('test', 'fixtures'));
6972
};
70-
helper({pattern: srcPattern, options: srcOptions}, obj, null, done);
73+
helper({ pattern: srcPattern, options: srcOptions }, obj, null, done);
7174
});
7275
});
7376
});
7477

75-
describe('basename', function () {
76-
it('strips extension like Path.basename(path, ext)', function (done) {
78+
describe('basename', function() {
79+
it('strips extension like Path.basename(path, ext)', function(done) {
7780
var srcPattern = 'test/fixtures/hello.min.txt';
78-
var obj = function (path) {
81+
var obj = function(path) {
7982
path.basename.should.equal('hello.min');
80-
path.basename.should.equal(Path.basename(srcPattern, Path.extname(srcPattern)));
83+
path.basename.should.equal(
84+
Path.basename(srcPattern, Path.extname(srcPattern))
85+
);
8186
};
8287
helper(srcPattern, obj, null, done);
8388
});
8489
});
8590

86-
describe('extname', function () {
87-
it('includes \'.\' like Path.extname', function (done) {
91+
describe('extname', function() {
92+
it("includes '.' like Path.extname", function(done) {
8893
var srcPattern = 'test/fixtures/hello.txt';
89-
var obj = function (path) {
94+
var obj = function(path) {
9095
path.extname.should.equal('.txt');
9196
path.extname.should.equal(Path.extname(srcPattern));
9297
};
9398
helper(srcPattern, obj, null, done);
9499
});
95100

96-
it('excludes multiple extensions like Path.extname', function (done) {
101+
it('excludes multiple extensions like Path.extname', function(done) {
97102
var srcPattern = 'test/fixtures/hello.min.txt';
98-
var obj = function (path) {
103+
var obj = function(path) {
99104
path.extname.should.equal('.txt');
100105
path.extname.should.equal(Path.extname(srcPattern));
101106
};
102107
helper(srcPattern, obj, null, done);
103108
});
104109
});
105110

106-
describe('multiExt option', function () {
107-
it('includes multiple extensions in extname', function (done) {
111+
describe('multiExt option', function() {
112+
it('includes multiple extensions in extname', function(done) {
108113
var srcPattern = 'test/fixtures/hello.min.txt';
109-
var obj = function (path) {
114+
var obj = function(path) {
110115
path.extname.should.equal('.min.txt');
111116
path.basename.should.equal('hello');
112117
};
113118
helper(srcPattern, obj, null, done, { multiExt: true });
114119
});
115120
});
116121

117-
describe('original file context', function () {
118-
it('passed to plugin as second argument', function (done) {
122+
describe('original file context', function() {
123+
it('passed to plugin as second argument', function(done) {
119124
var srcPattern = 'test/fixtures/hello.min.txt';
120-
var obj = function (path, file) {
125+
var obj = function(path, file) {
121126
file.should.be.instanceof(Object);
122127
file.should.be.ok();
123128
};
124129
helper(srcPattern, obj, null, done, { multiExt: true });
125130
});
126131

127-
it('has expected properties', function (done) {
132+
it('has expected properties', function(done) {
128133
var srcPattern = 'test/fixtures/hello.min.txt';
129-
var obj = function (path, file) {
134+
var obj = function(path, file) {
130135
file.path.should.equal(Path.resolve(srcPattern));
131136
file.base.should.equal(Path.dirname(Path.resolve(srcPattern)));
132137
file.basename.should.equal(Path.basename(srcPattern));

‎test/rename-sourcemap.spec.js

+11-15
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,29 @@ var Vinyl = require('vinyl');
55
var sourceMaps = require('gulp-sourcemaps');
66
require('should');
77

8-
describe('gulp-rename', function () {
9-
10-
context('when file has source map', function () {
11-
12-
it ('updates source map file to match relative path of renamed file', function (done) {
13-
8+
describe('gulp-rename', function() {
9+
context('when file has source map', function() {
10+
it('updates source map file to match relative path of renamed file', function(done) {
1411
var init = sourceMaps.init();
1512
var stream = init
1613
.pipe(rename({ prefix: 'test-' }))
1714
.pipe(rename({ prefix: 'test-' }));
1815

19-
stream.on('data', function (file) {
16+
stream.on('data', function(file) {
2017
file.sourceMap.file.should.equal('test-test-fixture.css');
2118
file.sourceMap.file.should.equal(file.relative);
2219
done();
2320
});
2421

25-
init.write(new Vinyl({
26-
base: 'fixtures',
27-
path: 'fixtures/fixture.css',
28-
contents: new Buffer('')
29-
}));
22+
init.write(
23+
new Vinyl({
24+
base: 'fixtures',
25+
path: 'fixtures/fixture.css',
26+
contents: new Buffer('')
27+
})
28+
);
3029

3130
init.end();
32-
3331
});
34-
3532
});
36-
3733
});

‎test/rename.spec.js

+62-62
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ var rename = require('../');
66
var gulp = require('gulp');
77
var Path = require('path');
88

9-
describe('gulp-rename', function () {
10-
context('with string parameter', function () {
11-
context('when src pattern does not contain directory glob', function () {
12-
it('sets filename to value', function (done) {
9+
describe('gulp-rename', function() {
10+
context('with string parameter', function() {
11+
context('when src pattern does not contain directory glob', function() {
12+
it('sets filename to value', function(done) {
1313
var srcPattern = 'test/fixtures/hello.txt';
1414
var obj = 'hola.md';
1515
var expectedPath = 'test/fixtures/hola.md';
1616
helper(srcPattern, obj, expectedPath, done);
1717
});
1818
});
19-
context('when src pattern contains directory glob', function () {
20-
it('sets relative path to value', function (done) {
19+
context('when src pattern contains directory glob', function() {
20+
it('sets relative path to value', function(done) {
2121
var srcPattern = 'test/**/hello.txt';
2222
var obj = 'fixtures/hola.md';
2323
var expectedPath = 'test/fixtures/hola.md';
@@ -26,135 +26,135 @@ describe('gulp-rename', function () {
2626
});
2727
});
2828

29-
context('with object parameter', function () {
29+
context('with object parameter', function() {
3030
var srcPattern;
31-
beforeEach(function () {
31+
beforeEach(function() {
3232
srcPattern = 'test/**/hello.txt';
3333
});
3434

35-
context('with empty object', function () {
36-
it('has no effect', function (done) {
35+
context('with empty object', function() {
36+
it('has no effect', function(done) {
3737
var obj = {};
3838
var expectedPath = 'test/fixtures/hello.txt';
3939
helper(srcPattern, obj, expectedPath, done);
4040
});
4141
});
4242

43-
context('with dirname value', function () {
44-
it('replaces dirname with value', function (done) {
43+
context('with dirname value', function() {
44+
it('replaces dirname with value', function(done) {
4545
var obj = {
46-
dirname: 'elsewhere',
46+
dirname: 'elsewhere'
4747
};
4848
var expectedPath = 'test/elsewhere/hello.txt';
4949
helper(srcPattern, obj, expectedPath, done);
5050
});
51-
it('removes dirname with \'./\'', function (done) {
51+
it("removes dirname with './'", function(done) {
5252
var obj = {
53-
dirname: './',
53+
dirname: './'
5454
};
5555
var expectedPath = 'test/hello.txt';
5656
helper(srcPattern, obj, expectedPath, done);
5757
});
58-
it('removes dirname with empty string', function (done) {
58+
it('removes dirname with empty string', function(done) {
5959
var obj = {
60-
dirname: '',
60+
dirname: ''
6161
};
6262
var expectedPath = 'test/hello.txt';
6363
helper(srcPattern, obj, expectedPath, done);
6464
});
6565
});
6666

67-
context('with prefix value', function () {
68-
it('prepends value to basename', function (done) {
67+
context('with prefix value', function() {
68+
it('prepends value to basename', function(done) {
6969
var obj = {
70-
prefix: 'bonjour-',
70+
prefix: 'bonjour-'
7171
};
7272
var expectedPath = 'test/fixtures/bonjour-hello.txt';
7373
helper(srcPattern, obj, expectedPath, done);
7474
});
7575
});
7676

77-
context('with basename value', function () {
78-
it('replaces basename with value', function (done) {
77+
context('with basename value', function() {
78+
it('replaces basename with value', function(done) {
7979
var obj = {
80-
basename: 'aloha',
80+
basename: 'aloha'
8181
};
8282
var expectedPath = 'test/fixtures/aloha.txt';
8383
helper(srcPattern, obj, expectedPath, done);
8484
});
85-
it('removes basename with empty string (for consistency)', function (done) {
85+
it('removes basename with empty string (for consistency)', function(done) {
8686
var obj = {
8787
prefix: 'aloha',
88-
basename: '',
88+
basename: ''
8989
};
9090
var expectedPath = 'test/fixtures/aloha.txt';
9191
helper(srcPattern, obj, expectedPath, done);
9292
});
9393
});
9494

95-
context('with suffix value', function () {
96-
it('appends value to basename', function (done) {
95+
context('with suffix value', function() {
96+
it('appends value to basename', function(done) {
9797
var obj = {
98-
suffix: '-hola',
98+
suffix: '-hola'
9999
};
100100
var expectedPath = 'test/fixtures/hello-hola.txt';
101101
helper(srcPattern, obj, expectedPath, done);
102102
});
103103
});
104104

105-
context('with extname value', function () {
106-
it('replaces extname with value', function (done) {
105+
context('with extname value', function() {
106+
it('replaces extname with value', function(done) {
107107
var obj = {
108-
extname: '.md',
108+
extname: '.md'
109109
};
110110
var expectedPath = 'test/fixtures/hello.md';
111111
helper(srcPattern, obj, expectedPath, done);
112112
});
113-
it('removes extname with empty string', function (done) {
113+
it('removes extname with empty string', function(done) {
114114
var obj = {
115-
extname: '',
115+
extname: ''
116116
};
117117
var expectedPath = 'test/fixtures/hello';
118118
helper(srcPattern, obj, expectedPath, done);
119119
});
120120
});
121121
});
122122

123-
context('with function parameter', function () {
123+
context('with function parameter', function() {
124124
var srcPattern;
125-
beforeEach(function () {
125+
beforeEach(function() {
126126
srcPattern = 'test/**/hello.txt';
127127
});
128128

129-
it('receives object with dirname', function (done) {
130-
var obj = function (path) {
129+
it('receives object with dirname', function(done) {
130+
var obj = function(path) {
131131
path.dirname.should.equal('fixtures');
132132
path.dirname = 'elsewhere';
133133
};
134134
var expectedPath = 'test/elsewhere/hello.txt';
135135
helper(srcPattern, obj, expectedPath, done);
136136
});
137137

138-
it('receives object with basename', function (done) {
139-
var obj = function (path) {
138+
it('receives object with basename', function(done) {
139+
var obj = function(path) {
140140
path.basename.should.equal('hello');
141141
path.basename = 'aloha';
142142
};
143143
var expectedPath = 'test/fixtures/aloha.txt';
144144
helper(srcPattern, obj, expectedPath, done);
145145
});
146146

147-
it('receives object with extname', function (done) {
148-
var obj = function (path) {
147+
it('receives object with extname', function(done) {
148+
var obj = function(path) {
149149
path.extname.should.equal('.txt');
150150
path.extname = '.md';
151151
};
152152
var expectedPath = 'test/fixtures/hello.md';
153153
helper(srcPattern, obj, expectedPath, done);
154154
});
155155

156-
it('receives object from return value', function (done) {
157-
var obj = function (path) {
156+
it('receives object from return value', function(done) {
157+
var obj = function(path) {
158158
return {
159159
dirname: path.dirname,
160160
basename: path.basename,
@@ -165,8 +165,8 @@ describe('gulp-rename', function () {
165165
helper(srcPattern, obj, expectedPath, done);
166166
});
167167

168-
it('ignores null return value but uses passed object', function (done) {
169-
var obj = function (path) {
168+
it('ignores null return value but uses passed object', function(done) {
169+
var obj = function(path) {
170170
path.extname.should.equal('.txt');
171171
path.extname = '.md';
172172
return null;
@@ -175,8 +175,8 @@ describe('gulp-rename', function () {
175175
helper(srcPattern, obj, expectedPath, done);
176176
});
177177

178-
it('receives object with extname even if a different value is returned', function (done) {
179-
var obj = function (path) {
178+
it('receives object with extname even if a different value is returned', function(done) {
179+
var obj = function(path) {
180180
path.extname.should.equal('.txt');
181181
path.extname = '.md';
182182
};
@@ -185,12 +185,12 @@ describe('gulp-rename', function () {
185185
});
186186
});
187187

188-
context('in parallel streams', function () {
189-
it('only changes the file in the current stream', function (done) {
188+
context('in parallel streams', function() {
189+
it('only changes the file in the current stream', function(done) {
190190
var files = gulp.src('test/fixtures/hello.txt');
191191

192-
var pipe1 = files.pipe(rename({suffix: '-1'}));
193-
var pipe2 = files.pipe(rename({suffix: '-2'}));
192+
var pipe1 = files.pipe(rename({ suffix: '-1' }));
193+
var pipe2 = files.pipe(rename({ suffix: '-2' }));
194194
var end1 = false;
195195
var end2 = false;
196196
var file1;
@@ -204,10 +204,10 @@ describe('gulp-rename', function () {
204204
}
205205

206206
pipe1
207-
.on('data', function (file) {
207+
.on('data', function(file) {
208208
file1 = file;
209209
})
210-
.on('end', function () {
210+
.on('end', function() {
211211
end1 = true;
212212

213213
if (end2) {
@@ -216,10 +216,10 @@ describe('gulp-rename', function () {
216216
});
217217

218218
pipe2
219-
.on('data', function (file) {
219+
.on('data', function(file) {
220220
file2 = file;
221221
})
222-
.on('end', function () {
222+
.on('end', function() {
223223
end2 = true;
224224

225225
if (end1) {
@@ -229,38 +229,38 @@ describe('gulp-rename', function () {
229229
});
230230
});
231231

232-
context('throws unsupported parameter type', function () {
232+
context('throws unsupported parameter type', function() {
233233
var srcPattern;
234-
beforeEach(function () {
234+
beforeEach(function() {
235235
srcPattern = 'test/**/hello.txt';
236236
});
237237

238238
var UNSUPPORTED_PARAMATER = 'Unsupported renaming parameter type supplied';
239-
it('with undefined object', function (done) {
239+
it('with undefined object', function(done) {
240240
var obj;
241241
var expectedError = UNSUPPORTED_PARAMATER;
242242
helperError(srcPattern, obj, expectedError, done);
243243
});
244244

245-
it('with null object', function (done) {
245+
it('with null object', function(done) {
246246
var obj = null;
247247
var expectedError = UNSUPPORTED_PARAMATER;
248248
helperError(srcPattern, obj, expectedError, done);
249249
});
250250

251-
it('with empty string', function (done) {
251+
it('with empty string', function(done) {
252252
var obj = '';
253253
var expectedError = UNSUPPORTED_PARAMATER;
254254
helperError(srcPattern, obj, expectedError, done);
255255
});
256256

257-
it('with boolean value', function (done) {
257+
it('with boolean value', function(done) {
258258
var obj = true;
259259
var expectedError = UNSUPPORTED_PARAMATER;
260260
helperError(srcPattern, obj, expectedError, done);
261261
});
262262

263-
it('with numeric value', function (done) {
263+
it('with numeric value', function(done) {
264264
var obj = 1;
265265
var expectedError = UNSUPPORTED_PARAMATER;
266266
helperError(srcPattern, obj, expectedError, done);

‎test/spec-helper.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ var Path = require('path'),
77
gulp = require('gulp'),
88
rename = require('../');
99

10-
global.helper = function (srcArgs, obj, expectedPath, done, options) {
10+
global.helper = function(srcArgs, obj, expectedPath, done, options) {
1111
var srcPattern = srcArgs.pattern || srcArgs;
1212
var srcOptions = srcArgs.options || {};
1313
var stream = gulp.src(srcPattern, srcOptions).pipe(rename(obj, options));
1414
var count = 0;
1515
stream.on('error', done);
16-
stream.on('data', function () {
16+
stream.on('data', function() {
1717
count++;
1818
});
1919
if (expectedPath) {
20-
stream.on('data', function (file) {
20+
stream.on('data', function(file) {
2121
var resolvedExpectedPath = Path.resolve(expectedPath);
2222
var resolvedActualPath = Path.join(file.base, file.relative);
2323
resolvedActualPath.should.equal(resolvedExpectedPath);
2424
});
2525
}
26-
stream.on('end', function () {
26+
stream.on('end', function() {
2727
count.should.be.greaterThan(0);
2828
done.apply(this, arguments);
2929
});
3030
};
3131

32-
global.helperError = function (srcPattern, obj, expectedError, done) {
32+
global.helperError = function(srcPattern, obj, expectedError, done) {
3333
var stream = gulp.src(srcPattern).pipe(rename(obj));
34-
stream.on('error', function (err) {
34+
stream.on('error', function(err) {
3535
err.message.should.equal(expectedError);
3636
done();
3737
});
38-
stream.on('data', function () {});
38+
stream.on('data', function() {});
3939
stream.on('end', done);
4040
};

0 commit comments

Comments
 (0)
Please sign in to comment.