babel-plugin-data-stylename

0.1.1 • Public • Published

babel-plugin-data-stylename

Replace all styleName attributes with data-stylename.

Install

npm install babel-plugin-data-stylename --save-dev

or

yarn add babel-plugin-data-stylename --dev

Use

To use this in a test environment, in your Babel config (shown here as a package.json property):

  "babel"{
    "env": {
      "test": {
        "plugins": [
          [ "data-stylename" ]
        ]
      }
    }
  }

Obviously, your test runner will need to be configured to use Babel. Note that Jest agressively caches transpiled code, and might need to be run with a --no-cache for you to see the change after installing the plugin.

Package Sidebar

Install

npm i babel-plugin-data-stylename

Weekly Downloads

4

Version

0.1.1

License

Apache-2.0

Last publish

Collaborators

  • richchurcher