New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-cx-imports

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-cx-imports

Rewrite imports from Cx for simplicity and optimal output size.

  • 16.12.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
461
increased by137.63%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-cx-imports

This plugin does three things:

  1. rewrites cx based imports to cx-core. E.g. import { TextField} from 'cx/widgets' becomes import { TextField} from 'cx-core/widgets'.

  2. optionally rewrites imports to use src files: import { TextField} from 'cx/widgets' becomes import { TextField} from 'cx-core/src/ui/form/TextField'.

  3. optionally includes SCSS files for imported components. E.g. import { TextField} from 'cx/widgets' adds also import 'cx-core/src/ui/form/TextField.scss'.

Usage

Standard:

//.babelrc
"plugins": [
    "transform-cx-imports"
]

To use src files, use:

//.babelrc
"plugins": [
    ["transform-cx-imports", { useSrc: true }]
]

Note that if using src files, your babel/webpack configuration should whitelist cx-core path.

Optionally, if you want to include .scss files, use:

//.babelrc
"plugins": [
    ["transform-cx-imports", { sass: true }]
]

Keywords

FAQs

Package last updated on 14 Dec 2016

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