Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: support template literals in object properties and jsx props #146

Merged
merged 2 commits into from
Oct 23, 2017

Conversation

satya164
Copy link
Member

@satya164 satya164 commented Oct 20, 2017

fixes #134, #138

@satya164 satya164 force-pushed the @satya164/properties branch 3 times, most recently from 451f7fe to 59ed07a Compare October 20, 2017 20:01
@satya164 satya164 force-pushed the @satya164/properties branch 3 times, most recently from 782a0d5 to 8ce4330 Compare October 21, 2017 15:09
@codecov
Copy link

codecov bot commented Oct 21, 2017

Codecov Report

Merging #146 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
- Coverage   97.57%   97.51%   -0.06%     
==========================================
  Files          20       19       -1     
  Lines         412      403       -9     
  Branches       80       81       +1     
==========================================
- Hits          402      393       -9     
  Misses         10       10
Impacted Files Coverage Δ
src/babel/preval-extract/validators.js 100% <ø> (ø) ⬆️
src/babel/preval-extract/index.js 100% <100%> (ø) ⬆️
src/babel/preval-extract/prevalStyles.js 100% <100%> (ø) ⬆️
src/babel/rewire-imports/index.js 100% <100%> (ø) ⬆️
src/babel/preval-extract/resolveSource.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99c3490...59d4604. Read the comment docs.

title = parent.node.name.name;
} else {
title = parent.node.key.name;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You should generate unique id after this line, otherwise the following will generate the same classnames:

const a = { header: css`...` }
const b = { header: css`...` }

// or

<article className={css`...`} />
<div>
  <article className={css`...`} />
</div>

Maybe title = path.scope.generateUidIdentifier(title).name.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will become a major problem if we settle on using filename in production also (#147).

Copy link
Member Author

@satya164 satya164 Oct 21, 2017

Choose a reason for hiding this comment

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

@zamotany will the unique id be consistent across builds?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes

@satya164 satya164 force-pushed the @satya164/properties branch 8 times, most recently from 1c65755 to 549ef20 Compare October 22, 2017 22:00
@zamotany zamotany merged commit 7febf68 into master Oct 23, 2017
@zamotany zamotany deleted the @satya164/properties branch October 23, 2017 10:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge hoist-css plugin with preval-extract
2 participants