Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rollup-plugin-buble and use shorthand ES6 class methods #5002

Closed
wants to merge 1 commit into from

Conversation

IvanSanchez
Copy link
Member

@IvanSanchez IvanSanchez commented Oct 3, 2016

This uses Rich Harris' Bublé in order to use "Object shorthand methods and properties", so instead of

var foo = L.Class.extend({
    method: function(par1, par2) {
         ...
    }
});

One can write:

var foo = L.Class.extend({
    method(par1, par2) {
         ...
    }
});

...thus saving a few bytes on the ES6 code.

We might also want to use things like default values for function parameters, arrow functions, and other things that transpile well.

cc @mourner

@IvanSanchez
Copy link
Member Author

IvanSanchez commented Oct 3, 2016

Note this targets the rollup2 branch, not master

@mourner
Copy link
Member

mourner commented Oct 4, 2016

Buble is pretty cool! I don't see why we wouldn't want to use it (it's pretty much free if we're already using rollup), but I'd probably want to hold on upgrading to ES6-isms until we land ES6 modules to avoid merge complications.

@IvanSanchez
Copy link
Member Author

Sounds like a sane thing to do. I'll close down this PR, but let's revisit this branch when #4989 is done.

@IvanSanchez IvanSanchez closed this Oct 4, 2016
@jonkoops jonkoops deleted the rollup3 branch May 23, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants