-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
new build that outs source es6 files into es5 folder #3445
Conversation
file sizes now: $ ls -lah dist/
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 929K Aug 1 15:48 video.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 168K Aug 1 16:00 video.js.gz
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 323K Aug 1 15:49 video.min.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 64K Aug 1 16:01 video.min.js.gz
$ ls -lah dist/alt
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 860K Aug 1 15:48 video.novtt.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 150K Aug 1 16:00 video.novtt.js.gz
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 295K Aug 1 15:49 video.novtt.min.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 54K Aug 1 16:01 video.novtt.min.js.gz and before: $ ls -lah dist/
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 755K Aug 1 15:55 video.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 159K Aug 1 15:55 video.js.gz
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 275K Aug 1 15:55 video.min.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 61K Aug 1 15:55 video.min.js.gz
$ ls -lah dist/alt
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 687K Aug 1 15:55 video.novtt.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 141K Aug 1 15:55 video.novtt.js.gz
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 247K Aug 1 15:55 video.novtt.min.js
-rw-r--r-- 1 gkatsevman VIDMARK\Domain Users 51K Aug 1 15:55 video.novtt.min.js.gz
The file sizes are different because babel 6 produces more correct es6 code. However, if you take a look at the gzipped sizes, they don't really change much. |
"babel": "^5.2.2", | ||
"babelify": "^6.0.1", | ||
"babel-cli": "^6.11.4", | ||
"babel-plugin-inline-json-config-values": "^1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two outstanding PRs against this repo right now. I'm going to wait a week or so before publishing my own version to use instead:
mountwill/babel-plugin-inline-json-config-values#2
mountwill/babel-plugin-inline-json-config-values#3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the browserify-versionify stuff could be removed.
Tests are broken because it's using the wrong version of the babel plugin. Also, I just realized that I think this is time for a proper solution to loading in vttjs. But I think it should be a separate PR but must be released with it. |
Loose mode is nice because it actually saves us about 100K in the build output. Plus, better IE8 support with it. |
And rebased against master. |
And it passed in browserstack as well: https://travis-ci.org/videojs/video.js/builds/151562935 |
Looks like this needs to be rebased. |
…operty from proxyquire
Looks like the current build system works on windows, with the caveat that the |
@misteroneill one thing I noticed when running this on windows through github desktop app. The ghook makes it impossible to actually push to your remote using the app. If we want to make it easier for users to contribute, this makes it harder. |
I believe this PR is done and ready to be reviewed/pulled in. |
Actually, maybe the github app thing is just my setup. Would be good if some else who has a windows machine could confirm. |
@gkatsev Makes sense re: Windows and ghooks. Is it because warnings the process is not exiting properly in Windows? EDIT: I have a Windows machine, I'll give it a shot this week/end if I have some downtime! |
It works fine if I open the git shell and push. I really don't know why the github app wasn't working. |
LGTM 👍 |
LGTM on 6c65b26 |
Description
Use babel to compile the source into es5 so that packagers can use it properly.
Specific Changes proposed
Update to latest version of babel, switch to babel-register, add grunt-babel, simply karma browserify config. use babel-preset-es2015-loose.
Make
main
point at the newes5/video.js
file and include thees5
build in the npm published folder. This probably should also be added to the bower build I guess?There's still some issues around updating to babel 6 and using babel-preset-es2015-loose. Also, needs testing in IE8.
This will also address #2750 and related issues.
Requirements Checklist
Run babel through the test folder also for a simpler buildMake the build closer to the plugin generator buildThe struck out ones can be done separately.