• Stars
    star
    857
  • Rank 51,013 (Top 2 %)
  • Language
  • License
    Creative Commons ...
  • Created about 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ˜ŽA list of awesome Babel plugins, presets, etc.

Awesome Babel Awesome

babel

A list of awesome Babel plugins, presets, etc. Many of these are from the community, but some are lesser-known plugins in the Babel organization that may be useful to you.

As always, use caution when trying out Babel plugins, especially those marked as ๐Ÿ”ง experimental or ๐Ÿ”ง๐Ÿšง under construction.

If you want to contribute, please read the contribution guidelines.

Parsers

  • babel-eslint - ESLint using Babel as the parser.
    • Note: ESLint now lints most ES6+ syntax. This parser is only necessary if you are using Flow types or other experimental features.

Plugins

General Plugins

  • external-helpers - Moves helper functions to a single imported module.
  • fast-async - Uses nodent to compile async/await to fast Promise output.
  • feature-flags - Helper for managing application feature flags.
  • idx - library + babel plugin for a existential function.
  • transform-builtin-extend - Enable extending builtin types like Error and Array, which require special treatment and require static analysis to detect.
  • console-source - Prepends the file name and line numbers for all console commands
  • version - Babel plugin replace defined identifier __VERSION__ to pkg.version.
  • babel-plugin-debug-tools Babeljs Debug Tools helps you insert debug code and easely remove it when deploy to production

Module Resolution

  • lodash - Cherry-picks Lodash modules so you donโ€™t have to.
  • ramda - Cherry-picks Ramda modules so you donโ€™t have to.
  • module-resolver - Custom module resolver.
  • root-import - Import modules from the root with require('~/foo') syntax.
  • webpack-alias - Allows you to use webpack aliases and most of webpack resolve features in Babel.
  • hash-resolve - Allows you to use require('#/path') instead of require('../../path'), the number of ../ needed is worked out by the plugin
  • rewrite-module-path - Rewrite module resolving path.

React

Internationalization

  • c-3po - Localization tool based on es6 template literals.
  • react-intl - Extracts string messages for translation from modules that use React Intl.
  • localize - Modify static jsx text and string attributes with function call. ๐Ÿ”ง

Types

Testing

  • espower - Annotates call sites for descriptive messages when using power-assert.
  • istanbul - Instruments your code with Istanbul coverage.
  • rewire - Adds the ability to rewire module dependencies. This enables to mock modules for testing purposes.

Optimization

Syntax Sugar

  • implicit-return - Transforms last statement in a function block to a return statement.
  • transform-iota - Golang-style iota(). ๐Ÿ”ง
  • offside-js - Coffeescript-like indented block syntax hack. ๐Ÿ”ง๐Ÿšง
  • trace - Syntax shortcuts for console logging.
  • meaningful-logs - Adds file name and line number of caller to console.log() calls.
  • implicit-function - Implicit functions via ~ operator, transforming, for example, ~x in () => x.
  • function-composition - Function piping and composition via & operator, for example, toUpper & console.log.
  • auto-await - Automatically await every Promise in async functions.

Alternative Programming Paradigms

  • macros - Hygienic, non-syntactic macros. ๐Ÿ”ง
  • contracts - Design by Contract; Includes preconditions, postconditions, and invariant conditions.
  • transform-scala-lambda - Enable Scala-style lambdas (using _). ๐Ÿ”ง
  • partial-application - Scala/Kotlin-esque partial application syntax for JavaScript (using _). ๐Ÿ”ง
  • overload - Allow overloading default operators like + or === for specific classes. ๐Ÿ”ง๐Ÿšง
  • babel-macros - Enables zero-config, importable babel plugins.
  • holes - Holes (like Scala and Elixir) to help point-free programming, using operators as functions. ๐Ÿ”ง

Presets

  • env - The recommended preset which includes transforms based on the specified environment (browsers, node, electron, etc).
  • React - Babel preset for all React plugins.
  • React Optimize - A Babel preset and plugins for optimizing React code.

Tooling

License

CC0

More Repositories

1

babel

๐Ÿ  Babel is a compiler for writing next generation JavaScript.
TypeScript
42,835
star
2

babel-loader

๐Ÿ“ฆ Babel loader for webpack
JavaScript
4,794
star
3

minify

โœ‚๏ธ An ES6+ aware minifier based on the Babel toolchain (beta)
JavaScript
4,375
star
4

babel-preset-env

PSA: this repo has been moved into babel/babel -->
JavaScript
3,502
star
5

babel-sublime

Syntax definitions for ES6 JavaScript with React JSX extensions.
JavaScript
3,260
star
6

babel-eslint

๐Ÿ—ผ A wrapper for Babel's parser used for ESLint (renamed to @babel/eslint-parser)
JavaScript
2,970
star
7

example-node-server

Example Node Server w/ Babel
JavaScript
2,842
star
8

babylon

PSA: moved into babel/babel as @babel/parser -->
JavaScript
1,714
star
9

babelify

Browserify transform for Babel
JavaScript
1,680
star
10

gulp-babel

Gulp plugin for Babel
JavaScript
1,322
star
11

babel-upgrade

โฌ†๏ธ A tool for upgrading Babel versions (to v7): `npx babel-upgrade`
JavaScript
1,308
star
12

babel-standalone

๐ŸŽฎ Now located in the Babel repo! Standalone build of Babel for use in non-Node.js environments, including browsers.
JavaScript
821
star
13

preset-modules

A Babel preset that targets modern browsers by fixing engine bugs (will be merged into preset-env eventually)
JavaScript
740
star
14

website

๐ŸŒ The Babel documentation website
TypeScript
740
star
15

kneden

Transpile ES2017 async/await to vanilla ES6 Promise chains: a Babel plugin
JavaScript
514
star
16

grunt-babel

Grunt plugin for Babel
JavaScript
438
star
17

proposals

โœ๏ธ Tracking the status of Babel's implementation of TC39 proposals (may be out of date)
433
star
18

eslint-plugin-babel

An ESlint rule plugin companion to babel-eslint
JavaScript
390
star
19

generator-babel-boilerplate

A Yeoman generator to author libraries in ES2015 (and beyond!) for Node and the browser.
JavaScript
381
star
20

babel-time-travel

Time travel through babel transformations one by one (implemented in the Babel REPL now)
JavaScript
345
star
21

babel-polyfills

A set of Babel plugins that enable injecting different polyfills with different strategies in your compiled code.
TypeScript
321
star
22

babel-sublime-snippets

Next generation JavaScript and React snippets for Sublime
264
star
23

karma-babel-preprocessor

Karma plugin for Babel
JavaScript
167
star
24

ruby-babel-transpiler

Ruby Babel is a bridge to the JS Babel transpiler.
Ruby
158
star
25

babel-jest

Jest plugin for Babel (moved) ->
139
star
26

notes

โ™ฌ Notes from the @Babel Team (discuss in PRs)
121
star
27

generator-babel-plugin

Babel Plugin generator for Yeoman
JavaScript
118
star
28

babel-bridge

A placeholder package that bridges babel-core to @babel/core.
JavaScript
94
star
29

babel-bot

๐Ÿค– A helpful bot to automate common tasks on Babel Issues/PRs
JavaScript
75
star
30

babel-brunch

Brunch plugin for Babel
JavaScript
69
star
31

broccoli-babel-transpiler

Broccoli plugin for Babel
JavaScript
58
star
32

jade-babel

Jade plugin for Babel
JavaScript
40
star
33

sandboxes

Babel repl-like codesandbox: check out link =>
JavaScript
39
star
34

jekyll-babel

A Babel converter for Jekyll.
Ruby
34
star
35

acorn-to-esprima

(unmaintained) Converts acorn tokens to esprima tokens
JavaScript
33
star
36

babel-connect

Connect plugin for Babel
JavaScript
27
star
37

podcast.babeljs.io

The Babel Podcast site!
JavaScript
25
star
38

phabricator-to-github

A tool to migrate phabricator issues to github
JavaScript
24
star
39

actions

Babel specific github actions ๐Ÿค–
JavaScript
24
star
40

rfcs

RFCs for changes to Babel
21
star
41

metalsmith-babel

A Metalsmith plugin to compile JavaScript with Babel
JavaScript
20
star
42

babel-configuration-examples

WIP
JavaScript
18
star
43

duo-babel

Duo plugin for Babel
JavaScript
16
star
44

logo

Babel logo
15
star
45

parser_performance

JavaScript
13
star
46

babel-standalone-bower

Bower build of babel-standalone. See https://github.com/Daniel15/babel-standalone
JavaScript
10
star
47

gobble-babel

Gobble plugin for Babel
JavaScript
9
star
48

eslint-config-babel

ESLint config for all Babel repos
JavaScript
9
star
49

eslint-plugin-babel-plugin

A set of eslint rules to enforce best practices in the development of Babel plugins.
JavaScript
8
star
50

flavortown

what else?
7
star
51

.github

Community health files for the Babel organization
7
star
52

babel-archive

๐Ÿ—‘ Packages that are deprecated or don't need to be updated
JavaScript
6
star
53

babel-test262-runner

Run test262 tests on Node 0.10 using Babel 7 and `core-js@3`.
JavaScript
6
star
54

babel-plugin-proposal-private-property-in-object

@babel/plugin-proposal-private-property-in-object, with an added warning for when depending on this package without explicitly listing it in dependencies or devDependencies
JavaScript
6
star
55

phabricator-redirects

โ†ฉ๏ธ Redirects for old phabricator urls
HTML
5
star
56

babel-plugin-transform-async-functions

https://github.com/MatAtBread/fast-async/issues/46
4
star
57

slack-invite-link

Source of slack.babeljs.io
1
star