Hi,
I have an ES6 compliant JS file, which I am trying to include in my Jira Plugin. unfortunately, when i run atlas-package the following error occurs.
[INFO] --- maven-amps-plugin:6.3.1:compress-resources (default-compress-resources) @ risk-management ---
[INFO] Compiling javascript using YUI
[ERROR] syntax error
AJS.toInit($ => {
[ERROR] Compilation produced 1 syntax errors.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.311 s
[INFO] Finished at: 2017-06-08T14:44:42+01:00
[INFO] Final Memory: 39M/300M
[INFO] ------------------------------------------------------------------------
I tried to insert this Code snippet in the Chrome console and it just works like a charm. Is there a way to use ES6 or do i have to use the old ways of JS?
After some search I came to conclusion that using
<compressResources>false</compressResources>
option in maven-amps-plugin configuration is the only way right now.
amps plugin comes with yuicompressor v2.4.7 from ancient 2012's
for JS compression you can use any other plugin or just don't use compression.
Sadly no way to use Google Closure Compiler
Waiting for an update from Atlassian team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually you can, if you want to take a little detour. With the help of this maven plugin Frontend Maven Plugin you can use Node for transpiling your JS files. You just have to update your pom.xml accordingly. You could also use webpack and JS frameworks like react, angular and sorts. It takes a while to setup, but it works really well if you want to use those new Technologies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello Chris,
i also want to use ES6 in my Plugin development,i only want the code to compile,i have no need to another Framework,so as i understand i have to add the dependency to my pom file,is there any special configuration i have to do ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.