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

babel-plugin-react-hyperscript-require

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-react-hyperscript-require

Babel plugin that adds react-hyperscript import declaration

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-react-hyperscript-require

Build
Status npm

 

Babel plugin that adds react-hyperscript import declaration

(this repo was cloned from styled-components-require and modified to be used with react-hyperscript)

 

Example

Your component.js that contains this code:

const Component = h('div', 'hello world');
export default Component;

will be transpiled to:

import h from 'react-hyperscript';

const Component = h('div', 'hello world');
export default Component;

 

Usage

npm install babel-plugin-react-hyperscript-require --save-dev

Add react-hyperscript-require into .babelrc

{
  "plugins": [
    "react-hyperscript-require"
  ]
}

 

Tests

✓ add import statement if h() is present

✓ do not add when no h in use

✓ do not add import react-hyperscript twice

✓ do not add if it already imported

 

You like?

:star: this repo

 

License

MIT © mciparelli

Keywords

FAQs

Package last updated on 10 Mar 2017

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