Neverending Pile of Messages
    Wondering what’s next for npm?Check out our public roadmap! »

    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

    3

    Version

    2.0.2

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • avatar
    • avatar