2019-02-13 00:24:14 +01:00
|
|
|
# @pushrocks/gulp-browserify
|
2015-10-27 16:46:57 +01:00
|
|
|
browserify and other goodies for gulp
|
|
|
|
|
2019-02-13 00:24:14 +01:00
|
|
|
## Availabililty and Links
|
|
|
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/gulp-browserify)
|
|
|
|
* [gitlab.com (source)](https://gitlab.com/pushrocks/gulp-browserify)
|
|
|
|
* [github.com (source mirror)](https://github.com/pushrocks/gulp-browserify)
|
|
|
|
* [docs (typedoc)](https://pushrocks.gitlab.io/gulp-browserify/)
|
2016-12-23 22:09:55 +01:00
|
|
|
|
|
|
|
## Status for master
|
2019-02-13 00:24:14 +01:00
|
|
|
[](https://gitlab.com/pushrocks/gulp-browserify/commits/master)
|
|
|
|
[](https://gitlab.com/pushrocks/gulp-browserify/commits/master)
|
|
|
|
[](https://www.npmjs.com/package/@pushrocks/gulp-browserify)
|
|
|
|
[](https://snyk.io/test/npm/@pushrocks/gulp-browserify)
|
|
|
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
|
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
2016-12-23 22:09:55 +01:00
|
|
|
[](http://standardjs.com/)
|
2015-10-27 16:46:57 +01:00
|
|
|
|
2016-12-23 22:09:55 +01:00
|
|
|
## Usage
|
2015-10-27 16:46:57 +01:00
|
|
|
|
2018-03-15 00:33:43 +01:00
|
|
|
Use TypeScript for best in class instellisense.
|
2017-07-07 18:35:20 +02:00
|
|
|
|
2015-10-27 16:46:57 +01:00
|
|
|
#### Browserify:
|
2018-03-15 00:33:43 +01:00
|
|
|
|
2016-12-23 22:09:55 +01:00
|
|
|
```javascript
|
2018-03-15 00:33:43 +01: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 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.
|
|
|
|
|
2016-05-13 18:15:16 +00:00
|
|
|
### Contributors
|
2018-03-15 00:33:43 +01:00
|
|
|
|
2019-02-13 00:24:14 +01:00
|
|
|
- [Phil Kunz](https://github.com/philkunz)
|
|
|
|
- [Steffan Donal](https://github.com/SteffanDonal)
|
2016-05-13 18:15:16 +00:00
|
|
|
|
2019-02-13 00:22:18 +01:00
|
|
|
For further information read the linked docs at the top of this readme.
|
2017-07-07 18:35:20 +02:00
|
|
|
|
|
|
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
2019-02-13 00:24:14 +01:00
|
|
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
2017-07-07 18:35:20 +02:00
|
|
|
|
2019-02-13 00:24:14 +01:00
|
|
|
[](https://maintainedby.lossless.com)
|