Skip to content

graffie/babel-plugin-transform-mill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-mill

Build Status

This plugin is 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

Releases

No releases published

Packages

No packages published