Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teppeis/gulp-dereserve
gulp plugin to replace ES3 reserved keyword indentifiers
https://github.com/teppeis/gulp-dereserve
Last synced: 2 months ago
JSON representation
gulp plugin to replace ES3 reserved keyword indentifiers
- Host: GitHub
- URL: https://github.com/teppeis/gulp-dereserve
- Owner: teppeis
- Created: 2014-09-24T15:37:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T20:52:26.000Z (over 7 years ago)
- Last Synced: 2024-10-25T19:51:51.315Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [gulp](http://gulpjs.com)-dereserve [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Dependency Status][deps-image]][deps-url]
> gulp plugin to replace ES3 reserved keyword indentifiers
IE8 cannot parse ES3 reserved keyword like `catch`.
This plugin converts `foo.catch()` to `foo["catch"]()` using [es3-safe-recast](https://www.npmjs.org/package/es3-safe-recast).## Install
```sh
$ npm install --save-dev gulp-dereserve
```## Usage
```js
var gulp = require('gulp');
var dereserve = require('gulp-dereserve');gulp.task('default', function () {
return gulp.src('src/file.js')
.pipe(dereserve())
.pipe(gulp.dest('dist'));
});
```### Source map
This plugin supports for generating and merging source map.
Use [gulp-sourcemaps](https://www.npmjs.org/package/gulp-sourcemaps).```sh
$ npm install --save-dev gulp-sourcemaps
``````js
var gulp = require('gulp');
var dereserve = require('gulp-dereserve');
var sourcemaps = require('gulp-sourcemaps');gulp.task('default', function () {
return gulp.src('src/*.js')
.pipe(sourcemaps.init())
.pipe(concat('build.js'))
.pipe(dereserve())
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist'));
});
```## API
### dereserve(options)
#### options
No options.
## License
MIT License [teppeis](https://github.com/teppeis)
[npm-image]: https://img.shields.io/npm/v/gulp-dereserve.svg
[npm-url]: https://npmjs.org/package/gulp-dereserve
[travis-image]: https://travis-ci.org/teppeis/gulp-dereserve.svg?branch=master
[travis-url]: https://travis-ci.org/teppeis/gulp-dereverse
[deps-image]: https://david-dm.org/teppeis/gulp-dereserve.svg
[deps-url]: https://david-dm.org/teppeis/gulp-dereserve