Skip to content

Commit

Permalink
Merge pull request #792 from maizzle/tailwind-content-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Oct 11, 2022
2 parents 677048e + b1beedf commit c2af961
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/generators/tailwindcss.js
Expand Up @@ -31,12 +31,19 @@ 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: [
'./src/components/**.html',
'./src/layouts/**.html',
typeof layoutsRoot === 'string' && layoutsRoot ?
`${layoutsRoot}/**/*.html`.replace(/\/\//g, '/') :
'./src/layouts/**/*.html',
typeof componentsRoot === 'string' && componentsRoot ?
`${componentsRoot}/**/*.html`.replace(/\/\//g, '/') :
'./src/components/**/*.html',
{raw: html, extension: 'html'}
]
}
Expand Down

0 comments on commit c2af961

Please sign in to comment.