Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

fis-parser-babel-latest

2.0.2 • Public • Published

fis-parser-babel-latest

A Plugin to translate es2015/es2016/es2017 to es5 based on babel in fis/fis3.

NPM version node version npm download

INSTALL

npm install -g fis-parser-babel-latest

USE

  • in fis3

    fis3.match('js/**.js', {
        parser: fis.plugin('babel-latest')
    })
    fis3.match('js/**.js', {
        parser: fis.plugin('babel-latest', {
            "presets": [
                ["env", {
                    "loose": true
                }],
                "react",
                "stage-0"
            ]
        })
    })
  • in fis

    fis.config.set('modules.parser.js', 'babel-latest');
    fis.config.set('settings.parser.babel-latest', {
        // options
    });
     
    fis.config.set('roadmap.path', [
        {
            reg: '/es6/**.js',
            isES6: true
        },
        {
            reg: '**.js',
            isES6: false // 排除其他
        }
    ].concat(fis.config.get('roadmap.path', []));

更多配置项参考:http://babeljs.io/docs/usage/options/

install

npm i fis-parser-babel-latest

Downloadsweekly downloads

8

version

2.0.2

license

BSD-2-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar