babel-plugin-transform-move-comments-to-top

Move comments to top of the file


Keywords
babel-plugin
License
MIT
Install
npm install babel-plugin-transform-move-comments-to-top@1.0.3

Documentation

babel-plugin-transform-move-comments-to-top

NPM version Build Status Test coverage Dependency Status

Move comments to top of the file

Install

$ npm install babel-plugin-transform-move-comments-to-top

Usage

.babelrc:

{
  "plugins": ["transform-move-comments-to-top"]
}

Caveats

plugins will execute after presets

transform-move-comments-to-top may not works when mixing it with other presets and plugins.

{
  "presets": ["es2015"],
  "plugins": ["transform-move-comments-to-top"]
}

A possible solution is doing another transform using transform-move-comments-to-top.

babel src -d lib && babel lib -d lib --plugins transform-move-comments-to-top

License

MIT © C.T. Lin