Socket
Book a DemoInstallSign in
Socket

@byteclaw/babel-plugin-visage

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byteclaw/babel-plugin-visage

A recommended babel preprocessing plugin for @byteclaw/visage design system. Hoists styles props from React JSX components.

1.0.0-alpha.2
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

babel-plugin-visage

@byteclaw/babel-plugin-visage version License

Babel plugin that improves Visage performance by hoisting styles prop to a root scope of a Component's file.

  • babel-plugin-visage

Example

In

import { Box } from '@byteclaw/visage';
import React from 'react';

export function Test() {
  return <>
    <Box styles={{ color: 'red' }}>
    <Box styles={{ color: 'blue' }}>
    <Box styles={{ color: 'green' }}>
  </>
}

Out

import { Box } from '@byteclaw/visage';
import React from 'react';

var _ref = Object.freeze({ color: 'red' });
var _ref2 = Object.freeze({ color: 'blue' });
var _ref3 = Object.freeze({ color: 'green' });

export function Test() {
  return <>
    <Box styles={_ref}>
    <Box styles={_ref2}>
    <Box styles={_ref3}>
  </>
}

Installation

yarn add --dev babel-plugin-visage

or if you prefer npm

npm install --save-dev babel-plugin-visage

Usage

{
  "plugins": ["@byteclaw/visage"]
}

License

MIT

Keywords

babel

FAQs

Package last updated on 04 Jun 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.