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

Simple blocks - complicated refactor #9

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Simple blocks - complicated refactor #9

wants to merge 11 commits into from

Conversation

d3dc
Copy link
Owner

@d3dc d3dc commented Aug 16, 2018

This exposes functions for creating elements and wrapping CSS modules by iterating through them as an alternative to #5. closes #2.

Under the hood, it made sense to enforce an AST, since different systems might provide different semantic meaning by default.

This makes it very modular and clean - the internal syntax machinery resolves and then the configured transformFn is run for each node.

because its doing more traversal and collecting over string building, this might be a lot slower...

@d3dc
Copy link
Owner Author

d3dc commented Aug 16, 2018

Looks to be about 65% slower

Shallow React Component Test Run Average over 10 runs:

StringsNodes
1.0409s1.714s

Update: it really looks like only half the time went to object creation... Where the rest go?

@d3dc
Copy link
Owner Author

d3dc commented Aug 17, 2018

Dist is broken by the flatmap polyfill:

Module not found: Can't resolve 'array.prototype.flatmap/auto' in '/../node_modules/classier-react/dist'

@d3dc
Copy link
Owner Author

d3dc commented Aug 20, 2018

flatMap is an unnecessary dependency.

I inlined a lot of functional stuff and invoked the dark art of imperative programming.

@d3dc d3dc force-pushed the simple-blocks branch 4 times, most recently from 7ac75e8 to 881472f Compare August 25, 2018 03:31
@d3dc
Copy link
Owner Author

d3dc commented Aug 25, 2018

going up as 1.0.0-next.5

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.

Add Block level abstraction
1 participant