Home

Awesome

broccoli-sucrase

Build Status

Broccoli Plugin for Sucrase (a babel alternative):

Super-fast alternative to Babel for when you can target modern JS runtimes

This module aims to experiment using sucrase in the broccoli and ember-cli ecosystems.

usage

Basic via Brocfile.js or Broccoli pipeline

// Brocfile.js
const sucrase = require('broccoli-sucrase');
module.exports = sucrase(__dirname + '/src', {
  sucrase: { /* any option sucrase.transform supports */ }
}); // where src/**/*.js contains ecmascript

Extension / Subclassing

// Brocfile.js
const sucrase = require('broccoli-sucrase');

module.exports = class CustomSucrase extends sucrase.Plugin {
  // custom behavior
};