Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-rewrite-imports

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-rewrite-imports

![NPM](https://img.shields.io/npm/v/gulp-rewrite-imports?color=green)

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gulp-rewrite-imports

NPM

A gulp plugin which allows to rewrite import and require statements in JavaScript and TypeScript files.

Install

The plugin can be installed as follows:

Yarn:

yarn add --dev gulp-rewrite-imports

NPM:

npm install --save-dev gulp-rewrite-imports

Basic usage

const { src, dest } = require('gulp');
const rewriteImports = require('gulp-rewrite-imports');

src('./src/**/*.js')
    .pipe(rewriteImports({
        mappings: {
            'some-module-name': 'another-module-name',
            'foo', {
                path: './some/nested/file/bar.js',
                relativeTo: './dist',
            },
        },
    })
    .pipe(dest('./dist'));

FAQs

Package last updated on 15 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc