Skip to content

Commit

Permalink
fix: export all style sub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Feb 20, 2019
1 parent b149754 commit 7a9893d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/dnb-ui-lib/scripts/prepub/tasks/makeMainStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@ export default async () => {
// info: use this aproach to process files because:
// this way we avoid cross "includePaths" and the result is:
// Now a custom theme can overwrite existing CSS Custom Properties
const listWithThemestoProcess = await globby(
const listWithThemesToProcess = await globby(
'./src/style/themes/theme-*/dnb-theme-*.scss'
)
await asyncForEach(listWithThemestoProcess, async themeFile => {
await asyncForEach(listWithThemesToProcess, async themeFile => {
// in order to keep the foder structure, we have to add these asteix
themeFile = themeFile.replace('/style/themes/', '/style/**/themes/')
await runFactory(themeFile, {
importOnce: false
})
})

await runFactory('./src/style/**/dnb-ui-components.scss')
await runFactory('./src/style/**/dnb-ui-patterns.scss')
await runFactory('./src/style/**/dnb-ui-core.scss')
const listWithPackagesToProcess = await globby(
'./src/style/dnb-ui-*.scss'
)
await asyncForEach(listWithPackagesToProcess, async packageFile => {
// in order to keep the foder structure, we have to add these asteix
packageFile = packageFile.replace('/style/', '/style/**/')
await runFactory(packageFile)
})

log.succeed(
'> PrePublish: "makeMainStyle" transforming style modules done'
Expand Down

0 comments on commit 7a9893d

Please sign in to comment.