eriwen / gradle-js-plugin

Gradle plugin for working with JS
http://eriwen.github.io/gradle-js-plugin
Apache License 2.0
382 stars 113 forks source link

Problem with ECMASCRIPT6 #141

Closed ghost closed 8 years ago

ghost commented 8 years ago

this language feature is only supported in es6 mode: template literal. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features

How can i solve this error?

My closure on minify task is:

closure { warningLevel = 'QUIET' compilationLevel = 'WHITESPACE_ONLY' }

ghost commented 8 years ago

I can solved this with:

  closure {
    warningLevel = 'DEFAULT'
    compilationLevel = 'WHITESPACE_ONLY'
    compilerOptions = [
      languageIn: 'ECMASCRIPT6',
      languageOut: 'ECMASCRIPT5'
    ]
  }

Class CompilerOptions contains the attributtes languageIn and languageOn... closure-compiler/src/com/google/javascript/jscomp/CompilerOptions.java

This resolve what is the languageIn and whats the languageOn: Additional Webservice Options

ghost commented 8 years ago

This should appear on plugin's documentation...