1. gulp-dereserve
gulp plugin to replace ES3 reserved keyword indentifiers
gulp-dereserve
Package: gulp-dereserve
Created by: teppeis
Last modified: Sat, 18 Jun 2022 16:56:47 GMT
Version: 0.2.1
License: MIT
Downloads: 463
Repository: https://github.com/teppeis/gulp-dereserve

Install

npm install gulp-dereserve
yarn add gulp-dereserve

gulp-dereserve NPM version build status Dependency Status

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.

Install

 $ npm install --save-dev gulp-dereserve

Usage

 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.

 $ npm install --save-dev gulp-sourcemaps
 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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin