Skip to content

Commit e0de7f0

Browse files
committed
feat: add custom formatType in destination for other type
1 parent 0c3a97c commit e0de7f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ export const makeSdTailwindConfig = ({
108108
throw new Error('formatType must be "js" or "cjs"')
109109
}
110110

111+
const destination =
112+
type !== 'all'
113+
? `${type}.tailwind.${formatType}`
114+
: `tailwind.config.${formatType}`
115+
111116
return {
112117
preprocessors,
113118
source: getConfigValue(source, ['tokens/**/*.json']),
@@ -135,10 +140,7 @@ export const makeSdTailwindConfig = ({
135140
buildPath: getConfigValue(buildPath, 'build/web/'),
136141
files: [
137142
{
138-
destination:
139-
type !== 'all'
140-
? `${type}.tailwind.js`
141-
: `tailwind.config.${formatType}`,
143+
destination,
142144
format: 'tailwindFormat'
143145
}
144146
]

0 commit comments

Comments
 (0)