Skip to content

Commit

Permalink
adding and configuring unplugin-icons package
Browse files Browse the repository at this point in the history
  • Loading branch information
briangregoryholmes committed Dec 8, 2023
1 parent 752d0b4 commit 3900f29
Show file tree
Hide file tree
Showing 13 changed files with 1,349 additions and 96 deletions.
1,381 changes: 1,291 additions & 90 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion web-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"svelte-popperjs": "^1.3.2",
"svelte-preprocess": "^4.10.6",
"tailwindcss": "^3.2.7",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"unplugin-icons": "^0.18.1"
},
"type": "module"
}
2 changes: 2 additions & 0 deletions web-admin/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
import "unplugin-icons/types/svelte";

declare namespace App {
interface Locals {
userid: string;
Expand Down
9 changes: 8 additions & 1 deletion web-admin/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { sveltekit } from "@sveltejs/kit/vite";
import dns from "dns";
import type { UserConfig } from "vite";
import Icons from "unplugin-icons/vite";

// print dev server as `localhost` not `127.0.0.1`
dns.setDefaultResultOrder("verbatim");
Expand All @@ -16,7 +17,13 @@ const config: UserConfig = {
port: 3000,
strictPort: true,
},
plugins: [sveltekit()],
plugins: [
sveltekit(),
Icons({
compiler: "svelte",
autoInstall: true,
}),
],
};

export default config;
1 change: 1 addition & 0 deletions web-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"svelte-check": "^3.0.1",
"tailwindcss": "^3.2.7",
"typescript": "^4.9.3",
"unplugin-icons": "^0.18.1",
"vite": "^4.0.0"
},
"type": "module"
Expand Down
2 changes: 2 additions & 0 deletions web-auth/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
import "unplugin-icons/types/svelte";

declare global {
namespace App {
// interface Error {}
Expand Down
9 changes: 8 additions & 1 deletion web-auth/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { sveltekit } from "@sveltejs/kit/vite";
import dns from "dns";
import type { UserConfig } from "vite";
import Icons from "unplugin-icons/vite";

// print dev server as `localhost` not `127.0.0.1`
dns.setDefaultResultOrder("verbatim");
Expand All @@ -18,7 +19,13 @@ const config: UserConfig = {
port: 3000,
strictPort: true,
},
plugins: [sveltekit()],
plugins: [
sveltekit(),
Icons({
compiler: "svelte",
autoInstall: true,
}),
],
};

export default config;
2 changes: 2 additions & 0 deletions web-common/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "unplugin-icons/types/svelte";

declare namespace svelteHTML {
interface HTMLAttributes {
// Used for copy action `shift-click-actions.ts`
Expand Down
1 change: 1 addition & 0 deletions web-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"tailwindcss": "^3.2.7",
"typescript": "^4.7.4",
"ua-parser-js": "^1.0.2",
"unplugin-icons": "^0.18.1",
"uuid": "^9.0.0",
"vitest": "^0.31.0",
"yaml": "^2.1.3",
Expand Down
9 changes: 8 additions & 1 deletion web-common/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { defineConfig, UserConfig } from "vitest/config";
import Icons from "unplugin-icons/vite";

type Writeable<T> = { -readonly [P in keyof T]: T[P] };
type Alias = Writeable<UserConfig["resolve"]["alias"]>;
Expand Down Expand Up @@ -43,7 +44,13 @@ export default defineConfig(({ mode }) => {
resolve: {
alias,
},
plugins: [svelte()],
plugins: [
svelte(),
Icons({
compiler: "svelte",
autoInstall: true,
}),
],
test: {
coverage: {
provider: "c8",
Expand Down
3 changes: 2 additions & 1 deletion web-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"svelte-check": "^3.0.3",
"svelte-preprocess": "^4.10.7",
"tree-kill": "^1.2.2",
"typescript": "4.6.3"
"typescript": "4.6.3",
"unplugin-icons": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions web-local/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
import "unplugin-icons/types/svelte";

declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}

export {};
9 changes: 8 additions & 1 deletion web-local/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { sveltekit } from "@sveltejs/kit/vite";
import dns from "dns";
import { defineConfig } from "vite";
import Icons from "unplugin-icons/vite";

// print dev server as `localhost` not `127.0.0.1`
dns.setDefaultResultOrder("verbatim");
Expand Down Expand Up @@ -40,7 +41,13 @@ const config = defineConfig(({ mode }) => ({
define: {
RILL_RUNTIME_URL: `"${runtimeUrl}"`,
},
plugins: [sveltekit()],
plugins: [
sveltekit(),
Icons({
compiler: "svelte",
autoInstall: true,
}),
],
}));

export default config;

0 comments on commit 3900f29

Please sign in to comment.