Skip to content

Commit

Permalink
fix(module): remove unnecessary templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Sep 12, 2023
1 parent 5321d61 commit a205139
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
28 changes: 9 additions & 19 deletions src/module.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,21 @@ async function addBuildTemplates(nuxt, options) {
});

addTemplate({
src: resolver.resolve('runtime/tmpl', 'fontConfig.mjs'),
fileName: MODULE_NAME + '/fontConfig.mjs',
write: true,
options: { content: getFontConfigTemplate(fontConfig) }
filename: MODULE_NAME + '/fontConfig.mjs',
getContents: () => getFontConfigTemplate(fontConfig),
write: true
});

addTemplate({
src: resolver.resolve('runtime/tmpl', 'fonts.mjs'),
fileName: MODULE_NAME + '/fonts.mjs',
write: true,
options: { content: getFontConfigCSSTemplate(fontConfig) }
filename: MODULE_NAME + '/fonts.mjs',
getContents: () => getFontConfigCSSTemplate(fontConfig),
write: true
});

addTemplate({
src: resolver.resolve('runtime/tmpl', 'fonts.css'),
fileName: MODULE_NAME + '/fonts.css',
write: true,
options: { content: fontConfig.toCSS() }
filename: MODULE_NAME + '/fonts.css',
getContents: () => fontConfig.toCSS(),
write: true
});

['client', 'server'].forEach(mode => {
Expand Down Expand Up @@ -159,13 +156,6 @@ async function addBuildTemplates(nuxt, options) {
supportedBrowserDetector
}
});

addTemplate({
src: resolver.resolve('runtime/tmpl', 'fonts.css'),
fileName: MODULE_NAME + '/fonts.css',
write: true,
options: { content: fontConfig.toCSS() }
});
}

async function addModules(nuxt, moduleOptions) {
Expand Down
1 change: 0 additions & 1 deletion src/runtime/tmpl/fontConfig.mjs

This file was deleted.

1 change: 0 additions & 1 deletion src/runtime/tmpl/fonts.css

This file was deleted.

1 change: 0 additions & 1 deletion src/runtime/tmpl/fonts.mjs

This file was deleted.

0 comments on commit a205139

Please sign in to comment.