add babelify test and example
This commit is contained in:
parent
7e210d473f
commit
7065094a84
@ -16,7 +16,12 @@ gulp-browser is meant to be easy:
|
||||
let gulp = require("gulp");
|
||||
let gulpBrowser = require("gulp-browser");
|
||||
|
||||
let transforms = [];
|
||||
let transforms = [
|
||||
{
|
||||
transform: "babelify",
|
||||
options: {presets: ["es2015", "react"]}
|
||||
}
|
||||
];
|
||||
|
||||
gulp.task('gulpBrowserTest',function() {
|
||||
var stream = gulp.src('./test/*.js')
|
||||
|
15
test/test.js
15
test/test.js
File diff suppressed because one or more lines are too long
13
test/test.ts
13
test/test.ts
@ -40,5 +40,18 @@ describe("gulpBrowser", function () {
|
||||
.pipe(plugins.gulp.dest("./test/result/"))
|
||||
.pipe(plugins.gulpFunction(done));
|
||||
});
|
||||
it("should run through work with transforms", function (done) {
|
||||
this.timeout(30000);
|
||||
let transforms = [
|
||||
{
|
||||
transform: "babelify",
|
||||
options: {presets: ["es2015", "react"]}
|
||||
}
|
||||
];
|
||||
let stream = plugins.gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(plugins.gulpBrowser.browserify(transforms))
|
||||
.pipe(plugins.gulp.dest("./test/result/"))
|
||||
.pipe(plugins.gulpFunction(done));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user