-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Resolve theme keys when migrating JS config to CSS #14675
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
Changes from 5 commits
fdaa85c
15e25c1
efddf08
35eab52
cb93881
6d32b7c
78ff789
f83aced
d3c5263
ddbfad1
c865e8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -193,7 +193,7 @@ | |
| ) | ||
|
|
||
| test( | ||
| 'does not upgrade JS config files with functions in the theme config', | ||
| 'upgrades JS config files with functions in the theme config', | ||
| { | ||
| fs: { | ||
| 'package.json': json` | ||
|
|
@@ -226,28 +226,30 @@ | |
| async ({ exec, fs }) => { | ||
| await exec('npx @tailwindcss/upgrade') | ||
|
|
||
| expect(await fs.dumpFiles('src/**/*.{css,ts}')).toMatchInlineSnapshot(` | ||
|
Check failure on line 229 in integrations/upgrade/js-config.test.ts
|
||
| " | ||
| --- src/input.css --- | ||
| @import 'tailwindcss'; | ||
| @config '../tailwind.config.ts'; | ||
|
|
||
| @theme { | ||
| --color-gray-50: #fafafa; | ||
| --color-gray-100: #f5f5f5; | ||
| --color-gray-200: #e5e5e5; | ||
| --color-gray-300: #d4d4d4; | ||
| --color-gray-400: #a3a3a3; | ||
| --color-gray-500: #737373; | ||
| --color-gray-600: #525252; | ||
| --color-gray-700: #404040; | ||
| --color-gray-800: #262626; | ||
| --color-gray-900: #171717; | ||
| --color-gray-950: #0a0a0a; | ||
| } | ||
| " | ||
| `) | ||
|
|
||
| expect(await fs.dumpFiles('tailwind.config.ts')).toMatchInlineSnapshot(` | ||
| " | ||
| --- tailwind.config.ts --- | ||
| import { type Config } from 'tailwindcss' | ||
|
|
||
| export default { | ||
| theme: { | ||
| extend: { | ||
| colors: ({ colors }) => ({ | ||
| gray: colors.neutral, | ||
| }), | ||
| }, | ||
| }, | ||
| } satisfies Config | ||
| " | ||
| `) | ||
| }, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.