Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (31 loc) · 539 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 539 Bytes

babel-plugin-dev

Replaces __DEV__ with process.env.NODE_ENV !== 'production'.

Installation

$ npm install babel-plugin-dev

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["dev"]
}

Via CLI

$ babel --plugins dev script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["dev"]
});

Running the tests

$ git clone https://github.com/Zenwolf/babel-plugin-dev.git
$ cd babel-plugin-dev
$ npm install
$ npm test