+
Skip to content

Use babel umd #290

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

Closed
wants to merge 8 commits into from
Closed

Conversation

clayreimann
Copy link
Member

This should not be merged until Babel 6.6.0 is released. babel@6.6.x is released.

This could constitute the beginnings of the rework for the 0.12.x/1.0.0 release

To Do:

@AurelioDeRosa
Copy link
Member

@clayreimann the reason why we didn't use Babel anymore is because we'll lose most of the code coverage tooling. While it's definitely possible to have the final metric value (e.g. 85% covered), the covered/uncovered lines will be lost. Also, altought very painful, we still need the dist files as demonstrated by issues like #285.

@clayreimann
Copy link
Member Author

I have:

  • Moved the testing from karma+mocha to just mocha
  • Fixed the tests to that they will actually run in mocha when I checkout from master all I see are timeouts when I try and run the tests
  • Moved to using babel's UMD wrapper to clean up our code
  • Added a fix for how we handle Blobs in node vs the browser

If this all looks good I'll add one more commit that fixes indentation in github.js. I haven't done that yet to keep the diff simple and not muck everything up with whitespace changes.

I think the changes here are going to be critical in allowing us to modularize our codebase going forward.

@aendra-rininsland
Copy link
Member

This is a huge amount of work, @clayreimann — thank you very much for it. I've admittedly been a bit distant from how @AurelioDeRosa has been managing the code the last while so it's ultimately up to him, but having gone through most of the PR (albeit fairly quickly), it looks pretty terrific.

  1. It seems all the Sauce Labs stuff has been stripped out. Thank you and good riddance; how I had it set up was woefully broken and any benefit gained from it was outweighed by the additional hassle it caused. It's better to not have it and then set it up later after the codebase has stabilized a bit. So, 👍 from me on that.
  2. npm test is broken (at least for the version of Gulp I have); either the Gulpfile should be updated so that gulp test:mocha is the default task of test, or package.json updated so that npm test starts the test cycle. I'm impartial to either solution.
  3. There's still a karma.conf.js even though Karma isn't a dep (unless I'm missing something, it's probably okay to just remove that too). With Karma gone, is there any way (or point) to still test in the browser?
  4. That all said, the tests run really nicely, so big ups on that.
  5. If we're now in Babel-land, we should consider dividing up the API into modules, so people consuming the lib via something like Rollup.js can treeshake stuff easily, and people can plugin parts of the API we don't care to support. Also feels like it'd be easier to manage a bunch of smaller files than one monolithic file.
  6. We should really remove the snarky comment about XMLHTTPRequest on ln. 38 considering we don't even deal with XHR anymore due to Axios handling it all now. 😅

That's all for now, will add more if I see anything else.

@clayreimann
Copy link
Member Author

@Aendrew Thanks for the review. I do plan on helping modularizing the library, but after #264 didn't go anywhere I figured it would be better to do it piecemeal.

Other changes in a7587fd:

  • Fixed npm test
  • Fixed whitespace linting in github.js

coverage/

.zuulrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this file for?

@AurelioDeRosa
Copy link
Member

A couple more comments:

  • The command npm run show-show-coverage-html fails with message "open is not a recognized command" (the operating system is Windows 8)
  • The command npm run codecov successfully creates the coverage but I had to access the file for github.js manually. For some reasons the generated index.html file doesn't have a link to it which had previously.

@AurelioDeRosa
Copy link
Member

I'd also say that we probably should start creating a v.1 branch. This way we can start merging all this work plus other things that will come in that branch, but keep merging the PRs other devs are submitting. Once we complete version 1, we can rebase and complete a massive merge.

@AurelioDeRosa AurelioDeRosa added this to the 1.0.0 milestone Mar 20, 2016
@clayreimann clayreimann deleted the use-babel-umd branch April 27, 2016 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载