Skip to content

Commit 5667666

Browse files
committed
Fix: Bind src/dest/symlink to the gulp instance to support esm exports (ref standard-things/esm#797)
1 parent 4091bd3 commit 5667666

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

Diff for: index.js

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ function Gulp() {
1616
this.registry = this.registry.bind(this);
1717
this.tree = this.tree.bind(this);
1818
this.lastRun = this.lastRun.bind(this);
19+
this.src = this.src.bind(this);
20+
this.dest = this.dest.bind(this);
21+
this.symlink = this.symlink.bind(this);
1922
}
2023
util.inherits(Gulp, Undertaker);
2124

Diff for: test/index.test.js

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
'use strict';
2+
3+
var expect = require('expect');
4+
5+
var gulp = require('../');
6+
7+
describe('gulp', function() {
8+
9+
describe('hasOwnProperty', function() {
10+
it('src', function(done) {
11+
expect(gulp.hasOwnProperty('src')).toEqual(true);
12+
done();
13+
});
14+
15+
it('dest', function(done) {
16+
expect(gulp.hasOwnProperty('dest')).toEqual(true);
17+
done();
18+
});
19+
20+
it('symlink', function(done) {
21+
expect(gulp.hasOwnProperty('symlink')).toEqual(true);
22+
done();
23+
});
24+
25+
it('watch', function(done) {
26+
expect(gulp.hasOwnProperty('watch')).toEqual(true);
27+
done();
28+
});
29+
30+
it('task', function(done) {
31+
expect(gulp.hasOwnProperty('task')).toEqual(true);
32+
done();
33+
});
34+
35+
it('series', function(done) {
36+
expect(gulp.hasOwnProperty('series')).toEqual(true);
37+
done();
38+
});
39+
40+
it('parallel', function(done) {
41+
expect(gulp.hasOwnProperty('parallel')).toEqual(true);
42+
done();
43+
});
44+
45+
it('tree', function(done) {
46+
expect(gulp.hasOwnProperty('tree')).toEqual(true);
47+
done();
48+
});
49+
50+
it('lastRun', function(done) {
51+
expect(gulp.hasOwnProperty('lastRun')).toEqual(true);
52+
done();
53+
});
54+
55+
it('registry', function(done) {
56+
expect(gulp.hasOwnProperty('registry')).toEqual(true);
57+
done();
58+
});
59+
});
60+
});

0 commit comments

Comments
 (0)