🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-dulcet-jsx-source

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-dulcet-jsx-source

Add a __source prop to all JSX Elements

latest
Source
npmnpm
Version
6.22.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-dulcet-jsx-source

Adds source file and line number to JSX elements.

Example

In

<sometag />

Out

<sometag __source={ { fileName: 'this/file.js', lineNumber: 10 } } />

Installation

npm install --save-dev babel-plugin-transform-dulcet-jsx-source

Usage

.babelrc

{
  "plugins": ["transform-dulcet-jsx-source"]
}

Via CLI

babel --plugins transform-dulcet-jsx-source script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-dulcet-jsx-source"]
});

Keywords

babel-plugin

FAQs

Package last updated on 27 Apr 2022

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