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

Compile all code for a better experience and flatten API #132

Merged
merged 1 commit into from
Jul 6, 2017

Conversation

evilsoft
Copy link
Owner

@evilsoft evilsoft commented Jul 5, 2017

It all starts NOW

image

This is a BIG BREAKING CHANGE!

This mainly addresses this issue and compiles all code into ES5 mainly so it can be used in Safari and IE/Edge without having the end user compile our stuff from their project (total bad news bears).

Two other things were started with the change, as it was going to be a breaking change anyway, decided to make the first step to a monorepo to address this issue. By flattening the API, it makes it easier to determine inner-dependency within the library and isolate it appropriately.

All code that is referenced by other functions/types in the library is now inside of a core folder, which will be the start of @crocksjs/core which will hold all the base code needed by the other functions. Another benefit of flattening the API is a lightened cognitive load of rememebring if this is a pointfree or helper function. All functions, regardless of their type can be reached from crocks/lib/[function_name], so no need to keep classification for each function in your head.

Another benefit of the separation of core, is that I removed all type checking (except for the crocks and monoids) and currying for the core versions of the functions. This greatly improves performance by only doing type checks once, before calling the functions in core. Also no extra currying, it leaves all currying in the public available API. This is the first stage of optimizing the code and improving for other libs that would like to use some of these bits.

@coveralls
Copy link

coveralls commented Jul 5, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 1d5aba8 on restructure-compile into b470875 on master.

@evilsoft
Copy link
Owner Author

evilsoft commented Jul 6, 2017

image

@evilsoft evilsoft merged commit 753bfcb into master Jul 6, 2017
@evilsoft evilsoft deleted the restructure-compile branch July 6, 2017 22:47
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.

2 participants