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

feat(tailwindcss-transformer): Scaffold package #3397

Conversation

alexcarpenter
Copy link
Contributor

@alexcarpenter alexcarpenter commented May 16, 2024

Description

Initializes a new package tailwindcss-transformer. This is an experimental package we will be using to rebuild AIO components using Elements and Tailwind CSS.

↓ Input ↓

export function Example({ flag }){
  let className = cn('absolute inset-0', flag && 'uppercase')
  return <div className={cn('flex items-center text-sm', className)} />
}

↓ Transform ↓

export function Example({ flag }){
  let className = cn('cl-7601190e', flag && 'cl-d2cf63c7')
  return <div className={cn('cl-f64ae6a6', className)} />
}
.cl-7601190e {
  @apply absolute inset-0;
}

.cl-d2cf63c7 {
  @apply uppercase;
}

.cl-f64ae6a6 {
  @apply flex items-center text-sm;
}

↓ Compile CSS ↓

.cl-7601190e {
  position: absolute;
  inset: 0;
}

.cl-d2cf63c7 {
  text-transform: uppercase;
}

.cl-f64ae6a6 {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented May 16, 2024

🦋 Changeset detected

Latest commit: 482fd0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexcarpenter alexcarpenter marked this pull request as ready for review May 17, 2024 15:27
packages/tailwindcss-transformer/LICENSE Outdated Show resolved Hide resolved
packages/tailwindcss-transformer/README.md Outdated Show resolved Hide resolved
"postcss-value-parser": "^4.2.0",
"recast": "^0.23.7",
"tailwindcss": "^3.4.3",
"vitest": "^1.6.0"
Copy link
Member

Choose a reason for hiding this comment

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

We're using Jest everywhere else so Vitest needs to be changed here to Jest

Copy link
Contributor

Choose a reason for hiding this comment

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

@LekoArts i checked in with @BRKalow about vitest and his conclusion was this wasn't a problem. its probably worth surfacing as a topic with a few more folks before we make any changes here @alexcarpenter (particularly bc this is all a bit exploratory atm)

@alexcarpenter alexcarpenter marked this pull request as draft May 21, 2024 14:01
alexcarpenter and others added 2 commits May 21, 2024 10:01
Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Lennart <lekoarts@gmail.com>
@alexcarpenter
Copy link
Contributor Author

Closing in favor of the work done in #3402

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.

None yet

4 participants