Skip to content

Commit

Permalink
fix: fix build dir for css.flat and js.esm format
Browse files Browse the repository at this point in the history
  • Loading branch information
yarastqt committed May 7, 2020
1 parent fae0298 commit 83a95ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Formats = {
}

export const formats: Formats = {
'css.flat': (platforms, options = { fileName: 'index.css' }) => {
'css.flat': (platforms, options) => {
const result = []
for (const platform in platforms) {
const layers = platforms[platform]
Expand All @@ -23,8 +23,8 @@ export const formats: Formats = {
composedTokens.push(...layers[layer].tokens)
}
result.push({
// FIXME: Fix filePath.
fileName: getFileNameWithPlatform(options.fileName, platform, options.fileName),
// FIXME: Fix build path.
fileName: getFileNameWithPlatform('build', platform, options.fileName || 'index.css'),
content: cssTemplate(composedTokens, ':root'),
})
}
Expand Down Expand Up @@ -67,8 +67,8 @@ export const formats: Formats = {
composedTokens.push(...layers[layer].tokens)
}
result.push({
// FIXME: Fix filePath.
fileName: getFileNameWithPlatform(options.fileName, platform, 'js'),
// FIXME: Fix build path.
fileName: getFileNameWithPlatform('build', platform, options.fileName || 'index.js'),
content: esmTemplate(composedTokens),
})
}
Expand Down

0 comments on commit 83a95ea

Please sign in to comment.