babel-plugin-transform-mill

0.1.0 • Public • Published

babel-plugin-transform-mill

This plugins build for Mill blog.

Example

In

<div>
  <span onClick={onClick}>
    {post.name}
    {a.b}
  </span>
</div>

Out

"use strict;"
 
module.exports = function (React, props) {
  var onClick = props.onClick,
      post = props.post,
      a = props.a;
  return React.createElement("div", null, React.createElement("span", {
    onClick: onClick
  }, post.name, a.b));
};

Installation

$ npm install babel-plugin-transform-mill

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-mill"]
}

Via CLI

$ babel --plugins babel-plugin-transform-mill script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-mill"]
});

LICENSE

LICENSE

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-transform-mill

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • xeodou