Skip to content

Commit

Permalink
Merge pull request #78 from debuggerpk/main
Browse files Browse the repository at this point in the history
chore(): updated to simple-icons v11
  • Loading branch information
wootsbot authored Feb 25, 2024
2 parents ed8626e + b3ed5de commit 10c07a1
Show file tree
Hide file tree
Showing 8 changed files with 825 additions and 666 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ icons/**
index.*
client.*
.svelte-kit
package
icons/
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,7 @@ npm add @icons-pack/svelte-simple-icons

## Usage

You can use [simpleicons.org](https://simpleicons.org) to find a specific icon.
When importing an icon, keep in mind that the names of the icons are [upperCamelCase](https://github.com/samverschueren/uppercamelcase) , for instance:

- [`Material Design`](https://simpleicons.org/?q=material) is exposed as `{ Materialdesign } from @icons-pack/svelte-simple-icons`
- [`azure devOps`](https://simpleicons.org/?q=azure%20devOps) is exposed as `{ Azuredevops } from @icons-pack/svelte-simple-icons`

These are some exceptions to this rule:

- [`500px`](https://simpleicons.org/?q=500px) is exposed as `{ FiveHundredPx } from @icons-pack/svelte-simple-icons`
- [`c++`](https://simpleicons.org/?q=+) is exposed as `{ Cplusplus } from @icons-pack/svelte-simple-icons`
- [`.Net`](https://simpleicons.org/?q=.net) is exposed as `{ DotNet } from @icons-pack/svelte-simple-icons`
- [`D3.js`](https://simpleicons.org/?q=d3) is exposed as `{ D3DotJs } from @icons-pack/svelte-simple-icons`
- [`dev.to`](https://simpleicons.org/?q=dev.to) is exposed as `{ DevDotTo } from @icons-pack/svelte-simple-icons`
- [`webcomponents.org`](https://simpleicons.org/?q=webcomponents.org) is exposed as `{ WebcomponentsDotOrg } from @icons-pack/svelte-simple-icons`
- [`X.Org`](https://simpleicons.org/?q=x.Org) is exposed as `{ XDotOrg } from @icons-pack/svelte-simple-icons`
- [`FerrarinDotVDot`](https://simpleicons.org/?q=Ferrari%20N.V) is exposed as `{ FerrarinDotVDot } from @icons-pack/svelte-simple-icons`
All icons are imported from a single file, where [ICON SLUG] is replaced by a capitalized [slug](https://github.com/simple-icons/simple-icons/blob/master/slugs.md).

## Demo

Expand All @@ -60,36 +45,39 @@ These are some exceptions to this rule:
## Basic example

```svelte
<!-- Import a specific icon by its slug as: -->
<!-- import { Si[ICON SLUG] } from 'simple-icons'; -->
<script>
import { ReactJs, Svelte, Docker } from "@icons-pack/svelte-simple-icons";
import { SiReact, SiSvelte, SiDocker } from "@icons-pack/svelte-simple-icons";
</script>
<Svelte color="#FF3E00" size={90} />
<SiSvelte color="#FF3E00" size={90} />
<ReactJs color="#61DAFB" size={50} />
<SiReactJs color="#61DAFB" size={50} />
<Docker />
<SiDocker />
```

## Change title

```svelte
<!-- title default "Svelte" -->
<script>
import { Svelte } from "@icons-pack/svelte-simple-icons";
import { SiSvelte } from "@icons-pack/svelte-simple-icons";
</script>
<Svelte title="My title" />
<SiSvelte title="My title" />
```

## Custom styles

```svelte
<script>
import { Svelte } from "@icons-pack/svelte-simple-icons";
import { SiSvelte } from "@icons-pack/svelte-simple-icons";
</script>
<Svelte class="myStyle" />
<SiSvelte class="myStyle" />
<style>
.myStyle {
Expand Down
30 changes: 16 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"exports": {
".": {
"types": "./index.d.ts",
"svelte": "./index.js",
"import": "./index.js"
},
"./package.json": "./package.json"
Expand All @@ -38,7 +39,7 @@
],
"scripts": {
"clean": "rm -rf index.* package",
"build": "pnpm clean && pnpm check && svelte-package && node ./scripts/clean_package.js && rm -rf package",
"build": "pnpm clean && pnpm check && svelte-package && node ./scripts/clean_package.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"clean:icons": "rm -rf ./src/lib/icons/**",
Expand All @@ -48,22 +49,23 @@
"release": "changeset publish"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.4",
"@changesets/cli": "^2.22.0",
"@sveltejs/adapter-auto": "^1.0.0",
"@sveltejs/kit": "^1.0.0",
"@sveltejs/package": "^1.0.0",
"tslib": "^2.4.1",
"@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/vite-plugin-svelte": "^3.0.2",
"signale": "^1.4.0",
"simple-icons": "9.19.0",
"svelte": "^3.54.0",
"svelte-check": "^2.9.2",
"simple-icons": "11.5.0",
"svelte": "^4.2.0",
"svelte-check": "^3.6.0",
"tslib": "^2.6.2",
"typescript": "5.2.2",
"uppercamelcase": "^3.0.0",
"vite": "^4.0.5",
"typescript": "5.2.2"
"vite": "^5.0.0"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0",
"svelte": "^3.54.0 || ^4.0.0"
"@sveltejs/kit": "^2.5.0",
"svelte": "^4.2.0"
}
}
Loading

0 comments on commit 10c07a1

Please sign in to comment.