Skip to content

Commit 7cccbd2

Browse files
committed
feat: add Prettier configuration and ignore files; introduce new icon components and update TypeScript settings for improved development experience
1 parent 68900f8 commit 7cccbd2

File tree

95 files changed

+2840
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2840
-373
lines changed

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Ignore Handlebars template files
2+
*.hbs
3+
4+
# Build output directories
5+
dist/
6+
build/
7+
8+
# Dependencies
9+
node_modules/
10+
11+
# Cache directories
12+
.cache/
13+
.next/
14+

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true
8+
}

apps/docs/pages/getting-started/usage.mdx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Fetch icons from your Figma file:
1111
npm run icon:fetch
1212

1313
# Or directly with the CLI
14-
npx iconsync fetch
14+
npx @iconsync/core fetch
1515
```
1616

1717
This will download SVG icons from your configured Figma file and store them in a local cache.
@@ -25,7 +25,7 @@ Generate React components from the fetched icons:
2525
npm run icon:generate
2626

2727
# Or directly with the CLI
28-
npx iconsync generator
28+
npx @iconsync/core generator
2929
```
3030

3131
This will create React components in the output directory specified in your configuration.
@@ -36,18 +36,13 @@ Import and use the generated icon components in your React application:
3636

3737
```jsx
3838
// Import the generated icon component
39-
import { ArrowRight } from '../components/icons';
39+
import { ArrowRight } from "../components/icons";
4040

4141
export default function IconExample() {
4242
return (
4343
<div>
4444
{/* Use the icon component */}
45-
<ArrowRight
46-
width={24}
47-
height={24}
48-
color="blue"
49-
title="Go to next page"
50-
/>
45+
<ArrowRight width={24} height={24} color="blue" title="Go to next page" />
5146
</div>
5247
);
5348
}
@@ -65,4 +60,4 @@ npm run icon:cache:stats
6560
npm run icon:cache:clear
6661
```
6762

68-
Clearing the cache can be useful when you want to ensure you're fetching the latest icons from Figma.
63+
Clearing the cache can be useful when you want to ensure you're fetching the latest icons from Figma.

apps/docs/pages/icons.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ After setting up your configuration file, you can fetch icons from Figma:
4141

4242
```bash
4343
# Using the CLI directly
44-
npx iconsync fetch
44+
npx @iconsync/core fetch
4545

4646
# Or using a package.json script
4747
npm run icon:fetch
@@ -53,7 +53,7 @@ After fetching icons, you can generate React components:
5353

5454
```bash
5555
# Using the CLI directly
56-
npx iconsync generator
56+
npx @iconsync/core generator
5757

5858
# Or using a package.json script
5959
npm run icon:generate
@@ -64,18 +64,18 @@ npm run icon:generate
6464
Once your icon components are generated, you can import and use them in your React application:
6565

6666
```jsx
67-
import { ArrowRight } from './components/icons';
67+
import { ArrowRight } from "./components/icons";
6868

6969
export default function IconExample() {
7070
return (
71-
<ArrowRight
72-
width={24}
73-
height={24}
74-
color="currentColor"
75-
title="Arrow Right Icon"
71+
<ArrowRight
72+
width={24}
73+
height={24}
74+
color="currentColor"
75+
title="Arrow Right Icon"
7676
/>
7777
);
7878
}
7979
```
8080

81-
The exact props available will depend on your generator configuration.
81+
The exact props available will depend on your generator configuration.

apps/docs/tsconfig.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"extends": "@iconsync/tsconfig/nextjs.json",
33
"compilerOptions": {
4-
"jsx": "react"
4+
"jsx": "preserve"
55
},
6-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
7-
"exclude": ["node_modules"]
6+
"include": [
7+
"next-env.d.ts",
8+
"**/*.ts",
9+
"**/*.tsx"
10+
],
11+
"exclude": [
12+
"node_modules"
13+
]
814
}

0 commit comments

Comments
 (0)