1.1.0 • Published 8 years ago

babel-plugin-module-provider v1.1.0

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

Module Provider

This plugin simply adds imports to the top of all of your files so you can spend more time writing the code that matters.

Examples

Default imports:

.babelrc :

{
  "presets": ["es2015"],
  "plugins": [
    ["modules-provider", {
      "@cycle/core": "Cycle",
      "@cycle/dom": "CycleDOM"
    }]
  ]
}

This configuration will put this at the top of your files

import Cycle from "@cycle/core";
import CycleDOM from "@cycle/core";

Non-default imports:

.babelrc :

{
  "presets": ["es2015"],
  "plugins": [
    ["modules-provider", {
      "@cycle/dom": ["div", "h2", "h4"]
    }]
  ]
}

This configuration will place this at the top of your files

import {div, h2, h4} from "@cycle/dom"