2015-10-24 16:51:30 +02:00
# gulp-browser
2015-10-27 16:46:57 +01:00
browserify and other goodies for gulp
2016-04-01 16:26:47 +02:00
### Status
2016-06-03 19:32:32 +02:00
[](https://gitlab.com/pushrocks/gulp-browser/commits/master)
2015-10-27 16:46:57 +01:00
[](https://david-dm.org/pushrocks/gulp-browser)
2015-12-05 22:48:02 +01:00
[](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
[](https://www.bithound.io/github/pushrocks/gulp-browser)
2016-04-02 21:06:36 +02:00
[](https://codecov.io/github/pushrocks/gulp-browser?branch=master)
2015-10-27 16:46:57 +01:00
### Usage
gulp-browser is meant to be easy:
#### Browserify:
2016-06-03 19:32:32 +02:00
```typescript
let gulp = require("gulp");
let gulpBrowser = require("gulp-browser");
2016-06-03 20:57:10 +02:00
let transforms = [
{
transform: "babelify",
2016-06-03 21:05:04 +02:00
options: {presets: ["es2015"]}
2016-06-03 20:57:10 +02:00
}
];
2015-10-27 16:46:57 +01:00
2015-10-27 16:55:44 +01:00
gulp.task('gulpBrowserTest',function() {
var stream = gulp.src('./test/*.js')
2016-05-13 18:18:49 +00:00
.pipe(gulpBrowser.browserify(transforms)) // gulp.browserify() accepts an optional array of tansforms
2015-10-27 16:55:44 +01:00
.pipe(gulp.dest("./test/browserifiedJS/"));
return stream;
2015-10-27 16:46:57 +01:00
});
2015-12-05 22:35:41 +01:00
```
2015-12-05 22:51:38 +01:00
> **Note:** Be aware of how gulp.src creates values of file.base and file.path since that is important to the require statements.
### Dev Information:
[](https://david-dm.org/pushrocks/gulp-browser#info =devDependencies)
2016-01-25 05:09:24 +01:00
[](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
2016-04-02 23:06:11 +02:00
### Extending this module
If you have ideas for other great browser related gulp pipe stops, feel free to raise an issue on GitHub.
2016-05-13 18:15:16 +00:00
### Contributors
2016-05-13 18:22:03 +00:00
* [Phil Kunz ](https://github.com/philkunz )
2016-05-13 18:15:16 +00:00
* [Steffan Donal ](https://github.com/SteffanDonal )
### About the maintainer:
2016-02-26 17:59:16 +01:00
[](https://lossless.com/)
2016-01-25 05:09:24 +01:00
2016-04-01 14:11:23 +00:00
[](https://paypal.me/lossless)