2.1.6 • Published 7 years ago

es6migrate v2.1.6

Weekly downloads
15
License
MIT
Repository
github
Last release
7 years ago

es6Migrate (ES5 => ES6)

CLI tool for migrating ES5 codebases to ES6 (node.js v7+ required)

npm.io

Optional file extension renaming, ex: .js to .es6.js.
Optional camel casing of file names, ex: Camel-case or CamelCase to camelCase.
Uses jscodeshift codemods to run migration tasks.

Migration tasks:

  • (amd) Transform AMD style modules to ES6 import/export.
  • (cjs) Transform CommonJS style require() calls to ES6 import statements.
  • (noStrict) Remove "use strict" statements.
  • (noVar) Replace all var calls to use let or const.
  • (templateLiteral) Replaces string concatenation with template literals.
  • (arrowFunction) Transforms callbacks only when it can guarantee not breaking this context in the function

Usage:

TEMPORARY: (=> jscodeshift needs to be installed globally with -g flag)

Install jscodeshift globally:

npm i -g jscodeshift

Navigate to the root of the folder that you want to migrate install es6migrate locally:

npm i es6migrate

Run es6migrate and follow instructions.

es6migrate

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.0.0

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago