Skip to content

Automatic hoisting.#414

Merged
tkh44 merged 19 commits into
masterfrom
hoisting
Oct 18, 2017
Merged

Automatic hoisting.#414
tkh44 merged 19 commits into
masterfrom
hoisting

Conversation

@tkh44
Copy link
Copy Markdown
Member

@tkh44 tkh44 commented Oct 17, 2017

What:
Hoist any arguments supplied to css or styled if they are not template literals (not sure if this matters).

Why:
Hoisting should increase the performance of inline css calls the most, but will have a secondary benefit for anyone using object styles.

How:
Use babel's isPure and hoist methods on the path.

Checklist:

  • Documentation
  • Tests
  • Code complete

}

hoistPureArgs(path)
path[visited] = true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will hoist every single CallExpression

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 17, 2017

Codecov Report

Merging #414 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted Files Coverage Δ
packages/babel-plugin-emotion/src/index.js 94.73% <100%> (+0.73%) ⬆️

@tkh44 tkh44 merged commit e041089 into master Oct 18, 2017
@tkh44 tkh44 deleted the hoisting branch October 18, 2017 18:35
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