1.3.0 • Published 7 years ago

@ahmadnassri/babel-build-all v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

Babel Build All version License

CLI utility to run babel CLI for all environments listed in your .babelrc

Build Status Downloads Code Climate Coverage Status Dependency Status Dependencies

Install

npm install --only=production --save --global @ahmadnassri/babel-build-all

Usage

$ babel-build-all
  • will look in the environment $PATH for babel executable
  • recommended ton use within an npm-script to auto populate $PATH values
package.json
"scripts": {
  ...
  "build": "babel-build-all",
  ...
}

assuming the following .babelrc and content of src folder in your project:

.babelrc
{
  "env": {
    "node4": {
      "presets": [ ["env", { "targets": { "node": 4.0 } }] ],
      "plugins": [...]
    },

    "node6": {
      "presets": [ ["env", { "targets": { "node": 6.0 } }] ],
      "plugins": [...]
    },

    "default": {
      "presets": [ ["env", { "targets": { "node": 7.0 } }] ],
      "plugins": [...]
    }
  }
}
./src
src
└── index.js

running babel-build-all will produce target builds matching env names in .babelrc:

./build
build
├── node4
│   └── index.js
├── node6
│   └── index.js
└── default
    └── index.js

:copyright: ahmadnassri.com  ·  License: ISC  ·  Github: @ahmadnassri  ·  Twitter: @ahmadnassri

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago