Plugins You can find out about all the publicly available Grails plugins.

Babel Asset-Pipeline Plugin

  • Tags: /
  • Latest: 1.4.5
  • Last Updated: 05 March 2016
  • Grails version: 2.2 > *
1 vote
Dependency:
compile "org.grails.plugins:babel-asset-pipeline:1.4.5"

 Documentation  Source  Issues

Summary

Adds babel transformation to Asset-Pipeline.

Installation

simply add the plugin to your BuildConfig. The plugin will ONLY process .es6 files if not otherwise told.

Description

This plugin adds babeljs transformation to .es6 files. This means you can write stuff like

var foo = "sparta";
console.log(`this is ${foo}`)
and the plugin transforms it into:
var foo = "sparta";
console.log("this is " + foo);

By default only .es6 files are processed!

configuration

grails.assets.babel.enabled = false // boolean
default to false. enables the plugin

grails.assets.babel.processJsFiles = false // boolean
defaults to false. Whether to process JsAssetFiles (.js) too. By default to Processor only touches Es6AssetFiles (.es6)!

grails.assets.babel.options = [blacklist: ['useStrict'], loose: 'all'] // babel transfom options. see https://babeljs.io/docs/usage/options/ for more information
defaults to null. A Map of options passed to babels transform method. see https://babeljs.io/docs/usage/options/ for possible values