1.1.0 • Published 7 years ago

babel-plugin-axiom v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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"]
});