gulp-browser/README.md

57 lines
2.8 KiB
Markdown
Raw Normal View History

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-12-23 21:09:55 +00:00
## Availabililty
2017-07-07 16:35:20 +00:00
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/gulp-browser)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/gulp-browser)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/gulp-browser)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/gulp-browser/)
2016-12-23 21:09:55 +00:00
## Status for master
[![build status](https://GitLab.com/pushrocks/gulp-browser/badges/master/build.svg)](https://GitLab.com/pushrocks/gulp-browser/commits/master)
[![coverage report](https://GitLab.com/pushrocks/gulp-browser/badges/master/coverage.svg)](https://GitLab.com/pushrocks/gulp-browser/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/gulp-browser.svg)](https://www.npmjs.com/package/gulp-browser)
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-12-23 21:09:55 +00:00
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
2016-07-26 16:50:00 +00:00
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
2016-12-23 21:09:55 +00:00
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
2015-10-27 15:46:57 +00:00
2016-12-23 21:09:55 +00:00
## Usage
Use TypeScript for best in class instellisense.
2015-10-27 15:46:57 +00:00
2017-07-07 16:35:20 +00:00
2015-10-27 15:46:57 +00:00
#### Browserify:
2016-12-23 21:09:55 +00:00
```javascript
2016-06-03 17:32:32 +00:00
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.
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)
2017-07-07 16:35:20 +00:00
For further information read the linked docs at the top of this README.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)