Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 7421c15

Browse files
author
Thorn Walli
committed
fix(cache): change tmp dir for fullstatic file watch
replace the srcDir/.tmp/nuxt-page-generator-helper dir with rootDir/nuxt-page-generator-helper
1 parent 8d2ddaa commit 7421c15

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ node_modules
1010
coverage
1111
dist
1212
reports
13-
.tmp
13+
nuxt-page-generator-helper

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Every not loaded resource is a good resource 🎉
2525
>
2626
> **_[nuxt-i18n](https://github.com/nuxt-community/nuxt-i18n) is a core component, if not used limit it to a default language._**
2727
28-
1. Add `.tmp` entry to gitignore.
28+
1. Add `nuxt-page-generator-helper` entry to gitignore.
2929

3030
2. Add `nuxt-page-generator-helper` dependency to your project
3131

lib/utils/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import consola from 'consola'
55
import rimraf from 'rimraf'
66

77
export const MODULE_NAME = 'nuxt-page-generator-helper'
8-
export const PATH_CACHE_DIR = path.join('.tmp', MODULE_NAME)
8+
export const PATH_CACHE_DIR = path.join(MODULE_NAME)
99
export const PATH_CACHE_ROUTES = path.join(PATH_CACHE_DIR, 'routes.json')
1010
export const PATH_CACHE_LAYOUT = path.join(PATH_CACHE_DIR, 'layout.json')
1111
export const PATH_CACHE_PAGES_DIR = path.join(PATH_CACHE_DIR, 'pages')
@@ -50,18 +50,18 @@ export function getShortName (prefix, component) {
5050
}
5151

5252
export function getLocaleRoutesCachePath (nuxt) {
53-
return path.join(nuxt.options.srcDir, PATH_CACHE_ROUTES)
53+
return path.join(nuxt.options.rootDir, PATH_CACHE_ROUTES)
5454
}
5555

5656
export function getLocaleLayoutCachePath (nuxt) {
57-
return path.join(nuxt.options.srcDir, PATH_CACHE_LAYOUT)
57+
return path.join(nuxt.options.rootDir, PATH_CACHE_LAYOUT)
5858
}
5959

6060
export function getPageCachePath (nuxt) {
61-
return path.join(nuxt.options.srcDir, PATH_CACHE_PAGES_DIR)
61+
return path.join(nuxt.options.rootDir, PATH_CACHE_PAGES_DIR)
6262
}
6363
export function getCachePath (nuxt) {
64-
return path.join(nuxt.options.srcDir, PATH_CACHE_DIR)
64+
return path.join(nuxt.options.rootDir, PATH_CACHE_DIR)
6565
}
6666

6767
export function createStaticComponents (moduleScope, options, routes) {

0 commit comments

Comments
 (0)