Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
jsx-transform-modern-cli
Advanced tools
A CLI tool for converting JSX files into standard JS.
Readme
A CLI tool for converting JSX files into standard JS.
This script looks for JSX code and isolates it before performing a transform using jsx-transform
on it. This allows it to support modern JS language features which might not be supported by the underlying jsx-transform
package.
This script will not transform code inside a prop's value. It ignores the contents of a prop. It does this by first converting the prop's value into a backtick-string, escaping any backticks inside the value. This turns the value into a string which jsx-transform
can handle in all cases. Then the transformed code is converted back into the original value.
Usage:
npx jsx-convert <glob> [--write] [--factory='h']
or
node ./node_modules/jsx-transform-modern-cli/src/index.mjs <glob> [--write] [--factory='h']
Some examples of what <glob>
can be:
build/**/*.js
build/**/*{.js,.jsx}
file.js
Input:
// Instaces of React are transform as well
import React from 'hyperscript'
const Component = () => (<div/>)
const test = (
<div>
<button onClick={() => console.log('click')}/>
<Component />
</div>
)
Output:
// Instaces of React are transform as well
import h from 'hyperscript'
const Component = () => (h('div'))
const test = (
h('div', null, [
h('button', {onClick: () => console.log('click')}),
Component()
])
)
FAQs
A CLI tool for converting JSX files into standard JS.
We found that jsx-transform-modern-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.