Hi,

Are you developing against Review Board 3.0? If so, you can rename the
JavaScript files to use a .es6.js extension, which will allow the
JavaScript to be transpiled to ES5, which will then work with UglifyJS.

If you're using older versions of Review Board, you will not be able to use
ES6 JavaScript due to the tooling, without working around things a fair bit.

Christian

On Tue, Jan 23, 2018 at 1:01 AM, Xy Sui <oswi...@gmail.com> wrote:

> Hi,
>
> I got compilation errors when trying to create egg files for 2 of my
> extensions, which work well in virtual env.
>
> The  error is "Unexpected token punc «(», expected punc «:»"
>
>       And I searched a little on internet, it looks like uglifyjs doesn't
> support ES6 format, while I have something in my javascript:
>                $.extend(RB.ReviewDialogView.prototype, {
>                              _saveReview(publish, options={}) {
>                                        xxxx
>                               }
>                 }
>
>       I tried to modify the code to different ways, but always got errors:
>              _saveReview: function(publish, options={})     --> Unexpected
> token operator «=», expected punc «,»
>              _saveReview: function(publish, options)          --> Unexpected
> token: name (madeChanges)
>
>
> How should I compile the egg, while overriding the saveReview method
> successfully?
>
> BR,
> oswicer
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to