パッケージの詳細

babel-plugin-parser-opts

timothygu97MIT非推奨1.0.1

Please use Babel's parserOpts option in order to change parser options. For more information, see https://github.com/TimothyGu/babel-plugin-parser-opts#deprecated

Pass arbitrary Babylon parser options to Babel

babel, babel-plugin

readme

babel-plugin-parser-opts

Pass arbitrary Babylon parser options to Babel.

Babel internally uses Babylon to parse JavaScript. However, it does not expose all of Babylon's options to be changed by users. This plugin makes it possible to change all of these options.

Installation

$ npm install babel-plugin-parser-opts

Usage

Via .babelrc

.babelrc

{
  "plugins": [
    [ "parser-opts", { "allowReturnOutsideFunction": true } ]
  ]
}

Via Node API

require('babel-core').transform('code', {
  plugins: [
    [ 'parser-opts', { allowReturnOutsideFunction: true } ]
  ]
});

Parser plugins

All provided options will overwrite existing options, with one exception: plugins. If provided, plugins array will be merged with existing.

更新履歴

Change log

1.0.1 / 2016-09-03

  • Fix packaging issue

1.0.0 / 2016-09-03

  • Initial release