Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 12 unique plugins #9

Merged
merged 1 commit into from
Apr 4, 2017
Merged

Added 12 unique plugins #9

merged 1 commit into from
Apr 4, 2017

Conversation

tphecca
Copy link
Contributor

@tphecca tphecca commented Apr 4, 2017

One night, I was trying to find a Babel plugin that enables CoffeeScript-like block indentation syntax. I found offside-js, which I also included. I also found a few more unique and interesting (to me) plugins that were not in this list:

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 (work in progress)
  • trace - Syntax shortcuts for console logging
  • meaningful-logs - Adds file name and line number of caller to console.log() calls

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
  • overload - Allow overloading default operators like + or === for specific classes

One night, I was trying to find a Babel plugin that enables CoffeeScript-like block indentation syntax. I found offside-js, which I also included. I also found a few more unique and interesting (to me) plugins that were not in this list:

## Optimization

 - [groundskeeper-willie](https://github.com/betaorbust/babel-plugin-groundskeeper-willie) - Removes debugger and console calls
 - [loop-optimizer](https://github.com/vihanb/babel-plugin-loop-optimizer) - Transforms `.forEach` and `.map` calls to for loops
 - [closure-elimination](https://github.com/codemix/babel-plugin-closure-elimination) - Transforms closures into separate functions

## Syntax Sugar

 - [implicit-return](https://github.com/miraks/babel-plugin-implicit-return) - Transforms last statement in a function block to a return statement
 - [transform-iota](https://github.com/passcod/babel-plugin-transform-iota) - Golang-style `iota()`
 - [offside-js](https://github.com/shanewholloway/babel-plugin-offside-js) - Coffeescript-like indented block syntax hack (work in progress)
 - [trace](https://github.com/codemix/babel-plugin-trace) - Syntax shortcuts for console logging
 - [meaningful-logs](https://github.com/furstenheim/babel-plugin-meaningful-logs) - Adds file name and line number of caller to `console.log()` calls

## Alternative Programming Paradigms

 - [macros](https://github.com/codemix/babel-plugin-macros) - Hygienic, non-syntactic macros
 - [contracts](https://github.com/codemix/babel-plugin-contracts) - Design by Contract; Includes preconditions, postconditions, and invariant conditions
 - [transform-scala-lambda](https://github.com/xtuc/babel-plugin-transform-scala-lambda) - Enable Scala-style lambdas
 - [overload](https://github.com/foxbenjaminfox/babel-plugin-overload) - Allow overloading default operators like `+` or `===` for specific classes
@STRML
Copy link
Contributor

STRML commented Apr 4, 2017

A lot of these are very interesting, many very experimental. @hzoo I assume that as long as we don't "endorse" these (aka, say that they're ready for use in prod or otherwise, only that they're interesting), it seems okay.

@hzoo
Copy link
Member

hzoo commented Apr 4, 2017

How do we signal that? Can we have a new heading for that or something? The purpose of the list is to showcase very useful plugins but there's a place for cool stuff - if not just for inspiration of other plugins or ideas.

@STRML
Copy link
Contributor

STRML commented Apr 4, 2017

Sure; I'll reorg this.

@STRML STRML merged commit 2bedec4 into babel:master Apr 4, 2017
STRML added a commit that referenced this pull request Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants