babel-plugin-react-rename
Rename react components.
Last updated 2 years ago by izaakschroeder .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-plugin-react-rename 
SYNC missed versions from official npm registry.

babel-plugin-react-rename

import path from 'path';

export default (componentName, {filename, cwd}) => {
  return path.relative(cwd, path.dirname(filename));
}
{
  "plugins": [
    ["babel-plugin-react-rename", {
      "only": "./src/component/**/*.js",
      "rename": "./config/babel/getComponentName.babel.js"
    }]
  ]
}

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

1 Versions

  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |