babel-plugin-axiom

1.1.0 • Public • Published

babel-plugin-axiom

Build Status npm version

This plugin is a transform to remove unused Axiom dependencies without the need to target the relative paths of exports.

See also

Example

// Input
import {
  shortDate,
  Base,
  DotPlotChart as DotPlotChartAxiom,
} from 'bw-axiom';
 
// Output
import shortDate from 'bw-axiom/lib/materials/date-and-time/shortDate';
import Base from 'bw-axiom/lib/components/base/Base';
import DotPlotChartAxiom from 'bw-axiom/lib/charts/dot-plot/DotPlotChart';

Limitations: You must be using ES6 imports (both specifiers and default work) to load axiom.

Usage

Via .babelrc (Recommended)
{
  "plugins": ["axiom"]
}
Via CLI
$ babel --plugins axiom script.js
Via Node API
require("babel-core").transform("code", {
  plugins: ["axiom"]
});

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-axiom

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • hhogg