Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 1.1 KB

File metadata and controls

42 lines (37 loc) · 1.1 KB

babel-plugin-transform-omodule-namespace

Build Status npm
This is a babel plugin to transform omodule structure scope constants.

Installation

$ npm install babel-plugin-transform-omodule-namespace --save-dev

Configuration

.babelrc

{
    "plugins": "transform-omodule-namespace"
}

Options

  • rootPath: (Default: project root) - specify the root of omodule structure.
{
    "plugins": [
        [
            "transform-omodule-namespace",
            { "rootPath": "./src" }
        ]
    ]
}
  • namespacePrefix: (Default: null) - add a prefix to namespace.
{
    "plugins": [
        [
            "transform-omodule-namespace",
            { "namespacePrefix": "/om" }
        ]
    ]
}