Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathiasbynens/gulp-regexpu
Gulp plugin to transpile ES6 Unicode regular expressions to ES5 with regexpu.
https://github.com/mathiasbynens/gulp-regexpu
Last synced: about 2 months ago
JSON representation
Gulp plugin to transpile ES6 Unicode regular expressions to ES5 with regexpu.
- Host: GitHub
- URL: https://github.com/mathiasbynens/gulp-regexpu
- Owner: mathiasbynens
- Created: 2014-08-24T20:22:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-15T16:08:47.000Z (almost 10 years ago)
- Last Synced: 2024-10-16T15:21:44.546Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://mths.be/gulp-regexpu
- Size: 191 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- es6-tools - gulp-regexpu
README
# gulp-regexpu [![Build status](https://travis-ci.org/mathiasbynens/gulp-regexpu.svg?branch=master)](https://travis-ci.org/mathiasbynens/gulp-regexpu) [![Dependency status](https://gemnasium.com/mathiasbynens/gulp-regexpu.svg)](https://gemnasium.com/mathiasbynens/gulp-regexpu)
gulp-regexpu is a [Gulp](http://gulpjs.com/) plugin to transpile ES6 Unicode regular expressions to ES5 with [_regexpu_](https://mths.be/regexpu).
*Issues with the output should be reported on [the _regexpu_ issue tracker](https://github.com/mathiasbynens/regexpu/issues).*
**Note:** You may want to use a full-blown transpiler such as [gulp-traceur](https://github.com/sindresorhus/gulp-traceur) or [gulp-babel](https://github.com/babel/babel) instead, as those support [_regexpu_](https://mths.be/regexpu) transpilation as well as many other ES6/ES7 features.
## Install
```bash
$ npm install gulp-regexpu --save-dev
```## Usage
```js
var gulp = require('gulp');
var regexpu = require('gulp-regexpu');gulp.task('default', function() {
return gulp.src('src/app.js')
.pipe(regexpu())
.pipe(gulp.dest('dist'));
});
```## Source Maps
Use [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) like this:
```js
var gulp = require('gulp');
var concat = require('gulp-concat');
var regexpu = require('gulp-regexpu');
var sourcemaps = require('gulp-sourcemaps');gulp.task('default', function() {
return gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(regexpu())
.pipe(concat('all.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist'));
});
```## Notes
Thanks to [Sindre Sorhus](https://github.com/sindresorhus), whose many great examples of Gulp plugins made it very easy to create this one. 🍺
## Author
| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |## License
_gulp-regexpu_ is available under the [MIT](https://mths.be/mit) license.