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

First steps towards ES6-ification #554

Closed
wants to merge 8 commits into from

Conversation

imbcmdth
Copy link

This is an example of some proposed changes to take the project towards a more ES6 direction. I am submitting this PR to get feedback from the community - it is nowhere near ready to be merged!

The build system has been overhauled to use babel and browserify to compile ES6 with imports down to ES5 that can run on all browsers. Uglify-js is then used to create the minimized versions.

The build directory has been gutted with the build process moved to the root directory and tests moved to their own sub-directory. This more closely follows common conventions in the node community. Installation is now just a git clone followed by npm i and grunt to build the files into the dist directory.

Every file is now a proper ES6 module that imports it's dependencies - there is no longer any dependency on the global scope. There is some cleanup necessary to have this work 100% - it seems like browserify is having issues with some of the circular dependencies.

There are NO change to the usage of dijon (yet!)

In src/dash/Dash.js and src/streaming/MediaPlayer.js, we take great pains to recreate the previous object hierarchy and in src/dash.js We make them global so that the interface appears the same from the outside world. This was done to ensure backward compatibility for testing purposes and allow us to test the changes in various demo pages without having to make changes to the tests themselves.

@heff
Copy link
Member

heff commented May 20, 2015

Thanks for submitting this, Jon!

All, we (Brightcove) asked Jon to put this together to explore if a move to ES6 made sense. We'll walk through what he's been able to do so far and ES6 in general at the face to face tomorrow, 16:00 in Berlin, 7:00 Pacific.

@yurydelendik
Copy link

After reading meeting minites, migration to ES6 was discussed multiple times and there were no concerns expressed there. What is the status of this pull request (except merge conflicts)?

Looks like this patch also addresses #779 and #418.

@dsparacio
Copy link
Contributor

So after the call today it looks like this is the path we are going to take. This PR will not be physically merged but used as a guide as we start to refactor. Work done here will not be lost and is the general direction we are taking the project. Thanks to @imbcmdth and @heff for taking the time to set this up.

@dsparacio dsparacio closed this Dec 2, 2015
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.

4 participants