Skip to content

Commit

Permalink
fix: watch html files
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed May 7, 2024
1 parent 84a3b1d commit d555188
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/create-domco/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-domco/template/index.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
12 changes: 6 additions & 6 deletions packages/domco/docs/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

***

Expand All @@ -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)

***

Expand Down Expand Up @@ -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)

***

Expand Down Expand Up @@ -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)

***

Expand All @@ -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

Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion packages/domco/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 6 additions & 2 deletions packages/domco/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d555188

Please sign in to comment.