Skip to content

Commit 6cd7cb3

Browse files
committed
rename pretty to prettyPrint
Indicating that the `pretty` option is about pretty printing the new value.
1 parent 9aad81e commit 6cd7cb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@tailwindcss-upgrade/src/codemods/migrate-theme-to-var.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function migrateThemeToVar({
1111
postcssPlugin: '@tailwindcss/upgrade/migrate-theme-to-var',
1212
OnceExit(root) {
1313
if (!designSystem) return
14-
let convert = createConverter(designSystem, { pretty: true })
14+
let convert = createConverter(designSystem, { prettyPrint: true })
1515

1616
root.walkDecls((decl) => {
1717
let [newValue] = convert(decl.value)

packages/@tailwindcss-upgrade/src/template/codemods/theme-to-var.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function themeToVar(
8080
return rawCandidate
8181
}
8282

83-
export function createConverter(designSystem: DesignSystem, { pretty = false } = {}) {
83+
export function createConverter(designSystem: DesignSystem, { prettyPrint = false } = {}) {
8484
function convert(input: string, options = Convert.All): [string, CandidateModifier | null] {
8585
let ast = ValueParser.parse(input)
8686

@@ -212,7 +212,7 @@ export function createConverter(designSystem: DesignSystem, { pretty = false } =
212212
if (!variable) return null
213213

214214
let modifier =
215-
parts.length > 0 ? (pretty ? ` / ${parts.join(' / ')}` : `/${parts.join('/')}`) : ''
215+
parts.length > 0 ? (prettyPrint ? ` / ${parts.join(' / ')}` : `/${parts.join('/')}`) : ''
216216
return fallback ? `theme(${variable}${modifier}, ${fallback})` : `theme(${variable}${modifier})`
217217
}
218218

0 commit comments

Comments
 (0)