Skip to content

Commit

Permalink
fix: normalize content source paths
Browse files Browse the repository at this point in the history
+ type check
  • Loading branch information
cossssmin committed Oct 11, 2022
1 parent 5d6fc16 commit e4b5da2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/generators/tailwindcss.js
Expand Up @@ -31,12 +31,15 @@ module.exports = {
}

// Merge user's Tailwind config on top of a 'base' config
const layoutsRoot = get(maizzleConfig, 'build.layouts.root')
const componentsRoot = get(maizzleConfig, 'build.components.root')

const config = merge({
important: true,
content: {
files: [
`${get(maizzleConfig, 'build.components.root', './src/components')}/**/*.html`,
`${get(maizzleConfig, 'build.layouts.root', './src/layouts')}/**/*.html`,
typeof layoutsRoot === 'string' ? path.normalize(`${layoutsRoot}/**/*.html`) : './src/layouts/**/*.html',
typeof componentsRoot === 'string' ? path.normalize(`${componentsRoot}/**/*.html`) : './src/components/**/*.html',
{raw: html, extension: 'html'}
]
}
Expand Down

0 comments on commit e4b5da2

Please sign in to comment.