diff --git a/integration/cli/create-tutorial.test.ts b/integration/cli/create-tutorial.test.ts index 32c058aa..e0e9b0d0 100644 --- a/integration/cli/create-tutorial.test.ts +++ b/integration/cli/create-tutorial.test.ts @@ -49,6 +49,20 @@ describe.each(['npm', 'pnpm', 'yarn'])('%s', (packageManager) => { expect(filesToJSON(distFiles)).toMatchFileSnapshot(`${snapshotPrefix}-built.json`); }); + + it('created project contains overwritten UnoCSS config', async ({ projectName, dest }) => { + await createProject(projectName, packageManager, { cwd: tmp }); + + const unoConfig = await fs.readFile(`${dest}/uno.config.ts`, 'utf8'); + + expect(unoConfig).toBe(`\ +import { defineConfig } from '@tutorialkit/theme'; + +export default defineConfig({ + // add your UnoCSS config here: https://unocss.dev/guide/config-file +}); +`); + }); }); async function createProject(name: string, packageManager: string, options: { cwd: string; install?: boolean }) { diff --git a/packages/cli/overwrites/uno.config.ts b/packages/cli/overwrites/uno.config.ts new file mode 100644 index 00000000..949120d9 --- /dev/null +++ b/packages/cli/overwrites/uno.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from '@tutorialkit/theme'; + +export default defineConfig({ + // add your UnoCSS config here: https://unocss.dev/guide/config-file +}); diff --git a/packages/template/uno.config.ts b/packages/template/uno.config.ts index 949120d9..74c8497f 100644 --- a/packages/template/uno.config.ts +++ b/packages/template/uno.config.ts @@ -1,5 +1,10 @@ import { defineConfig } from '@tutorialkit/theme'; export default defineConfig({ - // add your UnoCSS config here: https://unocss.dev/guide/config-file + // required for TutorialKit monorepo development mode + content: { + pipeline: { + include: '**', + }, + }, }); diff --git a/uno.config.js b/uno.config.js new file mode 100644 index 00000000..b67adfe9 --- /dev/null +++ b/uno.config.js @@ -0,0 +1,4 @@ +// for vscode intellisense +import { defineConfig } from './packages/theme/dist/index.js'; + +export default defineConfig({});