2.0.1 • Published 7 years ago

compile-es6 v2.0.1

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

Alert

Now we have a better npm package: compile-esx and compile-esx-sync

The compile-es6 will not be maintained...

What

compile-es6 can compile es6 code in src folder to es5 code in target folder.

Example

const compileEs6 = require('compile-es6');

compileEs6(path.join(__dirname, 'src'), path.join(__dirname, 'target'));

How

const compileEs6 = require('compile-es6');

compileEs6(srcFileOrFolderPath, targetFolderPath[, config]);
  • srcFileOrFolderPath

    • necessary: true
    • type: string
    • content: absolute file or folder path
  • targetFolderPath

    • necessary: true
    • type: string
    • content: absolute folder path
  • config

    • necessary: false

    • type: object

      • include

        Like webpack, compile-es6 will only compile files matching include.

        • necessary: false
        • type: regular expression
        • default: /\.js$/
      • exclude

        Like webpack, compile-es6 will not compile files matching exclude.

        • necessary: false
        • type: regular expression
        • default: null
      • presets

        for babel preset config.

        • necessary: false
        • type: array
        • default: ['es2015']
2.0.1

7 years ago

2.0.0

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago