Developer Tools43k+ stars
Babel
The JavaScript compiler - use next generation JS today
Commit Details
- Message
- "Initial commit"
- Author
- Sebastian McKenzie
- Date
- 2014-09-28
- Hash
- 7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a
Fun Fact
Sebastian McKenzie created Babel (originally 6to5) at age 17. It became essential for modern JavaScript development.
</>First Code
JavaScript
// 6to5 (now Babel) - Use ES6+ today
// Transform next-generation JavaScript into ES5
var transform = require("./transformation/transform");
module.exports = function (code, opts) {
opts = opts || {};
// Parse ES6+ code
var ast = parse(code, opts);
// Transform to ES5
var result = transform(ast, opts);
// Generate output
return generate(result);
};
// The magic: write modern JS, run it anywhere← All Projects
33 of 48