Skip to content

hiroppy/babel-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-init

Build Status

Setup .babelrc using command.

Install

$ npm install -g babel-init

Usage

$ npm init --yes #if you havn't made package.json
$ babel-init

Select presets and plugins!

Plugin List: https://babeljs.io/docs/plugins/

output

? Select presets latest, stage-0
? Select plugins syntax-flow and transform-flow-strip-types

.babelrc

{
  "env": {},
  "ignore": [],
  "plugins": [
    "syntax-flow",
    "transform-flow-strip-types"
  ],
  "presets": [
    "latest",
    "stage-0"
  ]
}

Customize

.babelinitrc

You can use .babelinitrc.
You put it on home or project root directory.
babel-init read this files and creating the select box.

{
  "presets": [],
  "plugins": []
}

The following is a sample file.

{
  "presets": [],
  "plugins": [
    {
      "name": "syntax-flow and transform-flow-strip-types",
      "value": "syntax-flow,transform-flow-strip-types"
    },
    "lodash",
    "transform-runtime"
  ]
}

name is the words displayed in the select box.
value is an installed package name. (same meaning as only string in array)

About

Setup .babelrc using command.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages