Skip to content

Conversation

@a-tarasyuk
Copy link
Contributor

@a-tarasyuk a-tarasyuk commented Nov 21, 2018

This PR contains the following changes:

  1. Use babel to automate bundle optimization (babel can be used with TypeScript)
  2. Make two versions of a bundle, one for CJS, and one for ES2015 modules
  3. Split tests to smaller chunks
  4. Add code coverage
  5. Add size limit
  6. Use nise to mock XMLHttpRequest
  7. Replace CJS assert to simple ok helper
  8. Use recommended TSLint rules with several overrides to follow previous styles
  9. Replace some of the lodash utils to native functions

The library size was decreased from 29,6 kB (MINIFIED + GZIPPED - simplerestclients@0.2.5) to 15.8 kB + library can be "tree-shakeable".

Note: Investigation shows that using import * as _ from 'lodash' is not acceptable in libraries. 1, 2, 3, 4

It is absolutely ok if this PR will not be accepted ;). First of all, it was created to get feedback about these changes from other @deregtd teammates. 🙇

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.

1 participant