Skip to content

Commit 7ba2a17

Browse files
fix: code review
Co-authored-by: Jòan <[email protected]>
1 parent 2e7243b commit 7ba2a17

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"astro": "astro",
8-
"build_with_check": "astro check && npm run build",
8+
"build_with_check": "astro check && pnpm run build",
99
"build": "astro build && cp _headers ./dist/",
1010
"dev": "astro dev",
1111
"preview": "astro preview",

docs/demo/src/content/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineCollection } from 'astro:content';
33

44
const tutorial = defineCollection({
55
type: 'content',
6-
schema: tutorialSchema.or(partSchema).or(chapterSchema).or(lessonSchema),
6+
schema: tutorialSchema.strict().or(partSchema.strict()).or(chapterSchema.strict()).or(lessonSchema.strict()),
77
});
88

99
export const collections = { tutorial };

docs/demo/uno.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { theme } from '@tutorialkit/astro';
22
import transformerDirectives from '@unocss/transformer-directives';
3-
import { globSync } from 'fast-glob';
3+
import { globSync, convertPathToPattern } from 'fast-glob';
44
import fs from 'node:fs/promises';
55
import { basename, dirname, join } from 'node:path';
66
import { defineConfig, presetIcons, presetUno } from 'unocss';
@@ -23,7 +23,9 @@ const customIconCollection = iconPaths.reduce(
2323
export default defineConfig({
2424
theme,
2525
content: {
26-
inline: globSync(join(require.resolve('@tutorialkit/components-react'), '../**/*.js')).map((filePath) => {
26+
inline: globSync(
27+
`${convertPathToPattern(join(require.resolve('@tutorialkit/components-react'), '..'))}/**/*.js`,
28+
).map((filePath) => {
2729
return () => fs.readFile(filePath, { encoding: 'utf8' });
2830
}),
2931
},

0 commit comments

Comments
 (0)