Skip to content

Commit f373c54

Browse files
committed
feat(module): update module & docs
1 parent c53f4fb commit f373c54

File tree

7 files changed

+5
-8
lines changed

7 files changed

+5
-8
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/nuxt.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ import { defineNuxtConfig } from 'nuxt'
33
import colors from 'tailwindcss/colors.js'
44

55
export default defineNuxtConfig({
6-
modules: ['vue-plausible'],
76
extends: [
87
(process.env.DOCUS_THEME_PATH || '@nuxt-themes/docus')
98
],
10-
ignore: [
11-
'content/**/*'
12-
],
139
components: [
1410
{
1511
path: '~/components',

src/module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ export default defineNuxtModule<ModuleOptions>({
7474
// Set buildTokens to real function as the feature is enabled
7575
const buildTokens = async (nitro) => {
7676
try {
77+
const start = performance.now()
7778
const tokens = await nitro.storage.getItem('cache:design-tokens:tokens.json') as NuxtDesignTokens
7879
await generateTokens(tokens, tokensDir)
79-
logger.success('Tokens built succesfully!')
80+
const end = performance.now()
81+
logger.success(`Design Tokens built in ${start - end}ms`)
8082
} catch (e) {
8183
logger.error('Could not build tokens!')
8284
logger.error(e.message)

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export const resolveConfig = (layer: NuxtLayer, key: string, configFile = `${key
4141

4242
if (filePath) {
4343
try {
44-
const _tokensFile = requireModule(filePath, { clearCache: true })
45-
if (_tokensFile) { config = _tokensFile }
44+
const _file = requireModule(filePath, { clearCache: true })
45+
if (_file) { config = _file }
4646
} catch (_) {}
4747
}
4848

0 commit comments

Comments
 (0)