marionettejs / backbone.radio

Messaging patterns for Backbone applications.
MIT License
490 stars 50 forks source link

Feature/272 es6 pkg module #275

Closed pglewis closed 6 years ago

pglewis commented 7 years ago

Fixes #272

blikblum commented 7 years ago

It's failing due to webpack version.

As a side note, later, we should replace webpack by rollup

pglewis commented 7 years ago

I wonder if just rolling back babel-loader to 6.2.0 would be enough to iron it out. That one isn't involved in the build so I probably should have left it alone.

paulfalgout commented 7 years ago

@marionettejs/marionette-core if 2nd thumb'd squash and merge

paulfalgout commented 7 years ago

We need to make sure this has named exports

blikblum commented 6 years ago

I think it can be merged as is.

The addition of named exports can be added later since means a bigger change and needs some discussion.

Radio public API is basically Channel class, channel function , reset, tuneIn, tuneOut, log, debugLog

While in Marionette migrating everything to named exports and killing the default exports was straight, in Radio doing the same will be a big breaking change.

By far the most used API in channel function, used like:

import Radio from 'backbone.radio'

Radio.channel('yy').request('xx')

By migrating to named exports like it would need to be changed to

import {channel} from 'backbone.radio'

channel('yy').request('xx')

There's some issues:

So migrating to named exports is possible but will need some API design changes that at this time (just before releasing marionette v4) i don't think is doable.

I propose to merge this and open a new issue for named export