Skip to content

ysoftwareab/babel-preset-y

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-preset-y Build Status

The Babel preset used within Y Software AB.

In your project's .babelrc.js

module.exports = {
  presets: [
    ['y', {
      // debug: false,
      // loose: false,
      // spec: false,
      // useBuiltIns: true,
      // 'preset|plugin': {...options}
    }]
  ]
};

Optionally, you can run node_modules/babel-preset-y/npm-install-peer-dependencies in order to install the required peer dependencies.

NOTE If you're using an earlier version than Babel 7.0, you can upgrade your .babelrc to be dynamic and use .babelrc.js by setting it to:

{
  "preset": [
    "./.babelrc.js"
  ]
}

See https://fatfisz.com/blog/using-babelrc-js-today .

Options

Pass debug, loose, spec or useBuiltIns to configure presets/plugins, as per the semantics defined by babel-preset-env.

Included presets/plugins can be

  • further configured by sending options to each of them
  • disabled by sending {"disabled": true} as options

Y plugins

babel-plugin-y-export-all (default: enabled)

README.babel-plugin-y-export-all.md

To disable in .babelrc.js:

module.exports = {
  presets: [
    ['y', {
      'babel-plugin-y-export-all': {
        disabled: true
      }
    }]
  ]
};

babel-plugin-y-src-arg (default: config-needed)

README.babel-plugin-y-src-arg.md

To disable in .babelrc.js:

module.exports = {
  presets: [
    ['y', {
      'babel-plugin-y-src-arg': {
        disabled: true
      }
    }]
  ]
};

Notable plugins (not included)

  1. https://github.com/kmagiera/babel-watch
  2. https://github.com/furstenheim/babel-plugin-meaningful-logs
  3. https://github.com/kentcdodds/babel-plugin-preval

Misc plugins

  1. https://github.com/codemix/flow-runtime/tree/master/packages/babel-plugin-flow-runtime
  2. https://github.com/vitalets/babel-plugin-runtyper
  3. https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend
  4. https://github.com/miraks/babel-plugin-implicit-return
  5. https://github.com/andreineculau/babel-plugin-thin-arrows

License

UNLICENSE