@tuqulore-inc/create-eleventy 5.3.0 → 5.3.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuqulore-inc/create-eleventy",
3
- "version": "5.3.0",
3
+ "version": "5.3.1-alpha.0",
4
4
  "description": "Create a new Eleventy project with Preact and TailwindCSS",
5
5
  "keywords": [
6
6
  "create",
@@ -31,11 +31,11 @@
31
31
  "test": "node --test"
32
32
  },
33
33
  "devDependencies": {
34
- "@tuqulore-inc/oxlint-config": "5.3.0",
34
+ "@tuqulore-inc/oxlint-config": "5.3.1-alpha.0",
35
35
  "oxlint": "^1.88.0"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=20"
39
39
  },
40
- "gitHead": "fe200b76dfd7e10af515f592d3e6ec1160d7966a"
40
+ "gitHead": "0235813479c57041387d1c450dd44c3bce330244"
41
41
  }
@@ -191,6 +191,18 @@ The `eleventy` singleton is typed. Built-in fields such as `eleventy.page` are t
191
191
  >
192
192
  > Keep at least one top-level `import` in `eleventy.env.d.ts`. Without one the file is not a module, and `declare module` replaces the package's types instead of extending them.
193
193
 
194
+ ### Collections
195
+
196
+ A directory under `src/` with a `_schema.ts` becomes a collection named after the directory. The build fails when an entry does not match the [Zod](https://zod.dev/) schema, and `eleventy.collections.<name>` is typed from it.
197
+
198
+ ```sh
199
+ pnpm add -D zod
200
+ pnpm exec eleventy-collections create posts # src/posts/_schema.ts and a sample .md
201
+ pnpm exec eleventy-collections create authors --type data # one entry per .json file
202
+ ```
203
+
204
+ Front matter is read as `post.data.title`. The types are written to `collections.d.ts` (git-ignored) by `pnpm build`, `pnpm dev`, and `pnpm lint`. See [@tuqulore-inc/eleventy-collections](https://github.com/tuqulore/website-boilerplate/tree/main/packages/eleventy-collections) for details.
205
+
194
206
  ### Island props
195
207
 
196
208
  `<Island>` checks its props against the props type of the wrapped client component. A misspelled or missing prop is a type error.
@@ -1,3 +1,4 @@
1
1
  .env*.local
2
+ /collections.d.ts
2
3
  dist
3
4
  node_modules
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
3
  "sortImports": true,
4
- "sortTailwindcss": true
4
+ "sortTailwindcss": true,
5
+ "ignorePatterns": ["collections.d.ts"]
5
6
  }
@@ -24,5 +24,11 @@
24
24
  "env": { "commonjs": true }
25
25
  }
26
26
  ],
27
- "ignorePatterns": ["**/dist/**", "**/node_modules/**", "pnpm-lock.yaml", "**/*.mdx"]
27
+ "ignorePatterns": [
28
+ "**/dist/**",
29
+ "collections.d.ts",
30
+ "**/node_modules/**",
31
+ "pnpm-lock.yaml",
32
+ "**/*.mdx"
33
+ ]
28
34
  }
@@ -8,7 +8,7 @@
8
8
  "clean": "shx rm -rf dist",
9
9
  "dev": "dotenv -c development -- eleventy --serve",
10
10
  "format": "oxfmt",
11
- "lint": "oxlint --fix --type-aware --type-check"
11
+ "lint": "eleventy-collections sync && oxlint --fix --type-aware --type-check"
12
12
  },
13
13
  "dependencies": {
14
14
  "serve-handler": "^6.1.6"
@@ -21,6 +21,7 @@
21
21
  "@preact/signals": "^2.9.3",
22
22
  "@tailwindcss/postcss": "^4.0.14",
23
23
  "@tailwindcss/typography": "0.5.20",
24
+ "@tuqulore-inc/eleventy-collections": "^5.3.0",
24
25
  "@tuqulore-inc/eleventy-preset": "^5.3.0",
25
26
  "@types/node": "^24.19.2",
26
27
  "@types/serve-handler": "^6.1.4",