Skip to content

Commit

Permalink
feat(): faster compilation method
Browse files Browse the repository at this point in the history
  • Loading branch information
Yousuf Jawwad committed Mar 25, 2024
1 parent 7946e88 commit d93c8f6
Show file tree
Hide file tree
Showing 3 changed files with 320 additions and 253 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,17 @@ All icons are imported from a single file, where [ICON SLUG] is replaced by a ca
}
</style>
```

## Faster Compilations

If you only need a few icons, you can import them individually instead of the entire file to improve compilation.

```svelte
<script>
import SiSvelte from "@icons-pack/svelte-simple-icons/icons/SiSvelte.svelte";
import SiGithub from "@icons-pack/svelte-simple-icons/icons/SiGithub.svelte";
</script>
<SiGithub />
<SiSvelte />
```
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"svelte": "./index.js",
"import": "./index.js"
},
"./icons/*": {
"types": "./icons/*.svelte.d.ts",
"svelte": "./icons/*.svelte"
},
"./package.json": "./package.json"
},
"description": "This package provides the Simple Icons packaged as a set of Svelte components.",
Expand Down Expand Up @@ -51,18 +55,18 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.27.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.5.0",
"@sveltejs/package": "^2.2.5",
"@sveltejs/adapter-auto": "^3.1.1",
"@sveltejs/kit": "^2.5.4",
"@sveltejs/package": "^2.3.0",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"signale": "^1.4.0",
"simple-icons": "11.5.0",
"svelte": "^4.2.0",
"svelte-check": "^3.6.0",
"svelte": "^4.2.12",
"svelte-check": "^3.6.8",
"tslib": "^2.6.2",
"typescript": "5.2.2",
"uppercamelcase": "^3.0.0",
"vite": "^5.0.0"
"vite": "^5.2.6"
},
"peerDependencies": {
"@sveltejs/kit": "^2.5.0",
Expand Down
Loading

0 comments on commit d93c8f6

Please sign in to comment.