Skip to content

Commit 7f530d9

Browse files
authored
chore: update @tutorialkit packages to 0.2.0 (#23)
1 parent 1666d31 commit 7f530d9

File tree

3 files changed

+40
-100
lines changed

3 files changed

+40
-100
lines changed

package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,21 @@
1414
"format": "prettier src --write"
1515
},
1616
"dependencies": {
17-
"@tutorialkit/components-react": "^0.1.6",
17+
"@tutorialkit/react": "^0.2.0",
1818
"react": "^18.2.0",
1919
"react-dom": "^18.2.0"
2020
},
2121
"devDependencies": {
2222
"@astrojs/check": "^0.6.0",
2323
"@astrojs/react": "^3.3.4",
24-
"@iconify-json/ph": "^1.1.12",
25-
"@iconify-json/svg-spinners": "^1.1.2",
26-
"@tutorialkit/astro": "^0.1.6",
27-
"@tutorialkit/theme": "^0.1.6",
28-
"@tutorialkit/types": "^0.1.6",
24+
"@tutorialkit/astro": "^0.2.0",
25+
"@tutorialkit/theme": "^0.2.0",
26+
"@tutorialkit/types": "^0.2.0",
2927
"@types/node": "^20.12.7",
30-
"@unocss/reset": "^0.59.4",
31-
"@unocss/transformer-directives": "^0.59.4",
3228
"astro": "^4.8.6",
33-
"fast-glob": "^3.3.2",
3429
"prettier": "^3.3.3",
3530
"prettier-plugin-astro": "^0.13.0",
3631
"typescript": "^5.4.5",
37-
"unocss": "^0.59.4",
3832
"vite": "^5.2.0",
3933
"yaml": "^2.4.5"
4034
},

pnpm-lock.yaml

Lines changed: 34 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

uno.config.ts

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
import { unoCSSConfig } from '@tutorialkit/astro';
2-
import { globSync, convertPathToPattern } from 'fast-glob';
3-
import fs from 'node:fs/promises';
4-
import { basename, dirname, join } from 'node:path';
5-
import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss';
1+
import { defineConfig } from "@tutorialkit/theme";
62

7-
const iconPaths = globSync('./icons/languages/*.svg');
8-
9-
const customIconCollection = iconPaths.reduce(
10-
(acc, iconPath) => {
11-
const collectionName = basename(dirname(iconPath));
12-
const [iconName] = basename(iconPath).split('.');
13-
14-
acc[collectionName] ??= {};
15-
acc[collectionName][iconName] = async () => fs.readFile(iconPath, 'utf8');
16-
17-
return acc;
18-
},
19-
{} as Record<string, Record<string, () => Promise<string>>>,
20-
);
21-
22-
export default defineConfig({
23-
...unoCSSConfig,
24-
content: {
25-
inline: globSync([
26-
`${convertPathToPattern(join(require.resolve('@tutorialkit/components-react'), '..'))}/**/*.js`,
27-
`${convertPathToPattern(join(require.resolve('@tutorialkit/astro'), '..'))}/default/**/*.astro`,
28-
]).map((filePath) => {
29-
return () => fs.readFile(filePath, { encoding: 'utf8' });
30-
}),
31-
},
32-
transformers: [transformerDirectives()],
33-
presets: [
34-
presetUno({
35-
dark: {
36-
dark: '[data-theme="dark"]',
37-
},
38-
}),
39-
presetIcons({
40-
collections: {
41-
...customIconCollection,
42-
},
43-
}),
44-
],
45-
});
3+
export default defineConfig({});

0 commit comments

Comments
 (0)