2015-10-24 14:51:30 +00:00
# gulp-browser
2015-10-27 15:46:57 +00:00
browserify and other goodies for gulp
2016-04-01 14:26:47 +00:00
### Status
2016-06-03 17:32:32 +00:00
[![build status ](https://gitlab.com/pushrocks/gulp-browser/badges/master/build.svg )](https://gitlab.com/pushrocks/gulp-browser/commits/master)
2015-10-27 15:46:57 +00:00
[![Dependency Status ](https://david-dm.org/pushrocks/gulp-browser.svg )](https://david-dm.org/pushrocks/gulp-browser)
2015-12-05 21:48:02 +00:00
[![bitHound Dependencies ](https://www.bithound.io/github/pushrocks/gulp-browser/badges/dependencies.svg )](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
[![bitHound Code ](https://www.bithound.io/github/pushrocks/gulp-browser/badges/code.svg )](https://www.bithound.io/github/pushrocks/gulp-browser)
2016-04-02 19:06:36 +00:00
[![codecov.io ](https://codecov.io/github/pushrocks/gulp-browser/coverage.svg?branch=master )](https://codecov.io/github/pushrocks/gulp-browser?branch=master)
2015-10-27 15:46:57 +00:00
### Usage
gulp-browser is meant to be easy:
#### Browserify:
2016-06-03 17:32:32 +00:00
```typescript
let gulp = require("gulp");
let gulpBrowser = require("gulp-browser");
2016-06-03 18:57:10 +00:00
let transforms = [
{
transform: "babelify",
2016-06-03 19:05:04 +00:00
options: {presets: ["es2015"]}
2016-06-03 18:57:10 +00:00
}
];
2015-10-27 15:46:57 +00:00
2015-10-27 15:55:44 +00: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 15:55:44 +00:00
.pipe(gulp.dest("./test/browserifiedJS/"));
return stream;
2015-10-27 15:46:57 +00:00
});
2015-12-05 21:35:41 +00:00
```
2015-12-05 21:51:38 +00: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:
[![devDependency Status ](https://david-dm.org/pushrocks/gulp-browser/dev-status.svg )](https://david-dm.org/pushrocks/gulp-browser#info=devDependencies)
2016-01-25 04:09:24 +00:00
[![bitHound Dev Dependencies ](https://www.bithound.io/github/pushrocks/gulp-browser/badges/devDependencies.svg )](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
2016-04-02 21:06:11 +00: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 16:59:16 +00:00
[![Project Phase ](https://mediaserve.lossless.digital/lossless.com/img/createdby_github.svg )](https://lossless.com/)
2016-01-25 04:09:24 +00:00
2016-04-01 14:11:23 +00:00
[![PayPal ](https://img.shields.io/badge/Support%20us-PayPal-blue.svg )](https://paypal.me/lossless)