Skip to content

Commit 38df1f3

Browse files
authored
chore: local development UnoCSS improvements (#325)
1 parent b68db8b commit 38df1f3

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

integration/cli/create-tutorial.test.ts

+14
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ describe.each(['npm', 'pnpm', 'yarn'])('%s', (packageManager) => {
4949

5050
expect(filesToJSON(distFiles)).toMatchFileSnapshot(`${snapshotPrefix}-built.json`);
5151
});
52+
53+
it<TestContext>('created project contains overwritten UnoCSS config', async ({ projectName, dest }) => {
54+
await createProject(projectName, packageManager, { cwd: tmp });
55+
56+
const unoConfig = await fs.readFile(`${dest}/uno.config.ts`, 'utf8');
57+
58+
expect(unoConfig).toBe(`\
59+
import { defineConfig } from '@tutorialkit/theme';
60+
61+
export default defineConfig({
62+
// add your UnoCSS config here: https://unocss.dev/guide/config-file
63+
});
64+
`);
65+
});
5266
});
5367

5468
async function createProject(name: string, packageManager: string, options: { cwd: string; install?: boolean }) {

packages/cli/overwrites/uno.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@tutorialkit/theme';
2+
3+
export default defineConfig({
4+
// add your UnoCSS config here: https://unocss.dev/guide/config-file
5+
});

packages/template/uno.config.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { defineConfig } from '@tutorialkit/theme';
22

33
export default defineConfig({
4-
// add your UnoCSS config here: https://unocss.dev/guide/config-file
4+
// required for TutorialKit monorepo development mode
5+
content: {
6+
pipeline: {
7+
include: '**',
8+
},
9+
},
510
});

uno.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// for vscode intellisense
2+
import { defineConfig } from './packages/theme/dist/index.js';
3+
4+
export default defineConfig({});

0 commit comments

Comments
 (0)