This package has been deprecated

Author message:

use @rocketstation/babel-plugin-web-convension

@rocketstation/babel-plugin-component-component

1.0.6 • Public • Published

Babel Plugin Component Component

Babel Plugin Component Component adds magic to components/**/component.js

Installation

npm i @rocketstation/babel-plugin-component-component

Usage

.babelrc

{ "plugins": ["@rocketstation/babel-plugin-component-component"], }

Options

Name Type Vals Default Description
blackBoxAlias String Any String '$' Defines black box alias

Scope

components/**/component.js

Magic

  • Modifies class {} or class Component {} to class PathToComponent {}
  • Modifies $box(config) to $.element('div', config)
  • Modifies $text(config) to $.element('span', config)
  • Modifies $link(path, config) to $.element('a', { b: { href: path, ...b }, p, s })
  • Modifies $img(path, text, config) to $.element('img', { b: { alt: text, src: path, ...b }, p })
  • Modifies $shape(canvas, config) to $.element('svg', { b: { viewBox: canvas, ...b }, p, s })
  • Modifies $path(shape, config) to $.element('path', { b: { d: shape, ...b }, p })

License

Babel Plugin Component Component is licensed under the MIT License

Created by RocketStation

Readme

Keywords

none

Package Sidebar

Install

npm i @rocketstation/babel-plugin-component-component

Weekly Downloads

16

Version

1.0.6

License

MIT

Unpacked Size

6 kB

Total Files

5

Last publish

Collaborators

  • oleksiibilous
  • oleksiipysanko