Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ineshbose authored Jan 18, 2024
1 parent 4f539d0 commit 8cf0a04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export default defineNuxtModule<ModuleOptions>({
addTemplate({
filename: 'tailwind.config.cjs',
getContents: () => `module.exports = ${JSON.stringify(resolvedConfig, null, 2)}`,
write: true,
...(typeof editorSupportConfig.generateConfig === 'object' ? editorSupportConfig.generateConfig : {})
})
}
Expand Down
3 changes: 1 addition & 2 deletions src/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export const resolveContentPaths = (srcDir: string, nuxt = useNuxt()) => {
const extensionFormat = (s: string[]) => s.length > 1 ? `.{${s.join(',')}}` : `.${s.join('') || 'vue'}`

const defaultExtensions = extensionFormat(['js', 'ts', 'mjs'])
const extensions = Array.from(new Set(['vue', ...nuxt.options.extensions]))
const sfcExtensions = extensionFormat(extensions.map(e => e.replace(/^\.*/, '')))
const sfcExtensions = extensionFormat(Array.from(new Set(['.vue', ...nuxt.options.extensions])).map(e => e.replace(/^\.*/, '')))

const importDirs = [...(nuxt.options.imports?.dirs || [])].map(r)
const [composablesDir, utilsDir] = [resolve(srcDir, 'composables'), resolve(srcDir, 'utils')]
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export type EditorSupportConfig = {
*
* Read https://tailwindcss.nuxtjs.org/tailwind/editor-support#load-config-file.
*
* Note: this is experimental and may change in future.
*
* @default false // if true, { filename: 'tailwind.config.cjs', write: true }
*/
generateConfig: BoolObj<Omit<import('nuxt/schema').NuxtTemplate, 'getContents'>>;
Expand Down

0 comments on commit 8cf0a04

Please sign in to comment.