From d55518892e120b30bc88bced9865472e2cd97ea7 Mon Sep 17 00:00:00 2001 From: rossrobino Date: Tue, 7 May 2024 09:57:20 -0400 Subject: [PATCH] fix: watch html files --- packages/create-domco/package.json | 2 +- packages/create-domco/template/index.ts | 2 +- packages/domco/docs/globals.md | 12 ++++++------ packages/domco/package.json | 2 +- packages/domco/plugin/index.ts | 8 ++++++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/create-domco/package.json b/packages/create-domco/package.json index 69439a0..ee7fff4 100644 --- a/packages/create-domco/package.json +++ b/packages/create-domco/package.json @@ -1,7 +1,7 @@ { "name": "create-domco", "description": "Create a new domco project", - "version": "0.0.45", + "version": "0.0.47", "type": "module", "types": "./index.d.ts", "main": "./index.js", diff --git a/packages/create-domco/template/index.ts b/packages/create-domco/template/index.ts index 394fc5b..66f9e82 100644 --- a/packages/create-domco/template/index.ts +++ b/packages/create-domco/template/index.ts @@ -1,7 +1,7 @@ const versions = { typesNode: "20.12.10", autoprefixer: "10.4.19", - domco: "0.5.11", + domco: "0.5.13", prettier: "3.2.5", prettierTailwind: "0.5.14", tailwind: "3.4.3", diff --git a/packages/domco/docs/globals.md b/packages/domco/docs/globals.md index 337fe06..e37d074 100644 --- a/packages/domco/docs/globals.md +++ b/packages/domco/docs/globals.md @@ -50,7 +50,7 @@ export const config: Config = { #### Source -[types/index.ts:55](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/types/index.ts#L55) +[types/index.ts:55](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/types/index.ts#L55) *** @@ -74,7 +74,7 @@ export const config: Config = { #### Source -[types/index.ts:3](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/types/index.ts#L3) +[types/index.ts:3](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/types/index.ts#L3) *** @@ -110,7 +110,7 @@ The route as a string, for example: `/posts/[slug]/` #### Source -[types/index.ts:16](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/types/index.ts#L16) +[types/index.ts:16](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/types/index.ts#L16) *** @@ -175,7 +175,7 @@ Provide the possible parameters for the current route. #### Source -[types/index.ts:69](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/types/index.ts#L69) +[types/index.ts:69](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/types/index.ts#L69) *** @@ -185,7 +185,7 @@ Provide the possible parameters for the current route. #### Source -[types/index.ts:67](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/types/index.ts#L67) +[types/index.ts:67](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/types/index.ts#L67) ## Functions @@ -229,4 +229,4 @@ export const config: Config = { #### Source -[helpers/addBlocks/index.ts:26](https://github.com/rossrobino/domco/blob/dafddc1d7f63cbf3011bbaaec6bed301367203ea/packages/domco/helpers/addBlocks/index.ts#L26) +[helpers/addBlocks/index.ts:26](https://github.com/rossrobino/domco/blob/84a3b1d68314ee85873d205cbe19d27ec12d80a0/packages/domco/helpers/addBlocks/index.ts#L26) diff --git a/packages/domco/package.json b/packages/domco/package.json index 7f20e6e..346f8b5 100644 --- a/packages/domco/package.json +++ b/packages/domco/package.json @@ -1,7 +1,7 @@ { "name": "domco", "description": "Build-Time Rendering Without Templates", - "version": "0.5.11", + "version": "0.5.13", "type": "module", "keywords": [ "vite-plugin", diff --git a/packages/domco/plugin/index.ts b/packages/domco/plugin/index.ts index 7bb0b5f..d829d9c 100644 --- a/packages/domco/plugin/index.ts +++ b/packages/domco/plugin/index.ts @@ -124,14 +124,18 @@ export const domco = (options?: { const fileEndings = [ `${configFileName}.js`, `${configFileName}.ts`, - // nice to also have for these files by default: + // nice to also have for these files by default "md", "txt", "json", ]; for (const ending of fileEndings) { - if (file.endsWith(ending)) { + if ( + file.endsWith(ending) || + // for layout files + (!file.endsWith("index.html") && file.endsWith("html")) + ) { sendFullReload(); return; }