gulp-browser/README.md

58 lines
2.4 KiB
Markdown
Raw Normal View History

2019-02-12 23:29:32 +00:00
# @pushrocks/gulp-browser
2015-10-27 15:46:57 +00:00
browserify and other goodies for gulp
2019-02-12 23:24:14 +00:00
## Availabililty and Links
2019-02-12 23:29:32 +00:00
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/gulp-browser)
* [gitlab.com (source)](https://gitlab.com/pushrocks/gulp-browser)
* [github.com (source mirror)](https://github.com/pushrocks/gulp-browser)
* [docs (typedoc)](https://pushrocks.gitlab.io/gulp-browser/)
2016-12-23 21:09:55 +00:00
## Status for master
2019-02-12 23:29:32 +00:00
[![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/@pushrocks/gulp-browser.svg)](https://www.npmjs.com/package/@pushrocks/gulp-browser)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/gulp-browser/badge.svg)](https://snyk.io/test/npm/@pushrocks/gulp-browser)
2019-02-12 23:24:14 +00:00
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.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
2015-10-27 15:46:57 +00:00
2018-03-14 23:33:43 +00:00
Use TypeScript for best in class instellisense.
2017-07-07 16:35:20 +00:00
2015-10-27 15:46:57 +00:00
#### Browserify:
2018-03-14 23:33:43 +00:00
2016-12-23 21:09:55 +00:00
```javascript
2018-03-14 23:33:43 +00:00
let gulp = require('gulp');
let gulpBrowser = require('gulp-browser');
let transforms = [
{
transform: 'babelify',
options: { presets: ['es2015'] }
}
];
gulp.task('gulpBrowserTest', function() {
var stream = gulp
.src('./test/*.js')
.pipe(gulpBrowser.browserify(transforms)) // gulp.browserify() accepts an optional array of tansforms
.pipe(gulp.dest('./test/browserifiedJS/'));
return stream;
});
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
2018-03-14 23:33:43 +00:00
2019-02-12 23:24:14 +00:00
- [Phil Kunz](https://github.com/philkunz)
- [Steffan Donal](https://github.com/SteffanDonal)
2016-05-13 18:15:16 +00:00
2019-02-12 23:22:18 +00:00
For further information read the linked docs at the top of this readme.
2017-07-07 16:35:20 +00:00
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
2019-02-12 23:24:14 +00:00
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
2017-07-07 16:35:20 +00:00
2019-02-12 23:24:14 +00:00
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)