Merge pull request #177 from pheralb/next

 Add figma plugin.
This commit is contained in:
Pablo Hdez 2023-12-28 11:59:57 +00:00 committed by GitHub
commit b013c036ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 23 deletions

View File

@ -14,12 +14,12 @@
Submit logo
</a>
<span>&nbsp;&nbsp;</span>
<a href="#-terminal">
Terminal
<a href="#-extensions">
Extensions
</a>
<span>&nbsp;&nbsp;</span>
<a href="https://twitter.com/pheralb_">
Contact
<a href="https://svgl.app/api">
API
</a>
<span>&nbsp;&nbsp;</span>
<a href="#%EF%B8%8F-contributing">
@ -120,9 +120,10 @@ or to support a different logo for light and dark themes:
And create a pull request with your logo 🚀.
5. (Optional) If you want to run the API locally, you will need to create a `.env` file in the root of the project with the following variables:
5. (Optional) If you want to run the [API](https://svgl.app/api) locally, you will need to create a `.env` file in the root of the project with the following variables:
- [Create a Upstash account](https://console.upstash.com/).
- [Create a Upstash Redis Database](https://upstash.com/docs/redis/overall/getstarted).
```bash
SVGL_API_REQUESTS = 1
@ -130,21 +131,14 @@ UPSTASH_REDIS_URL = ""
UPSTASH_REDIS_TOKEN = ""
```
## 💻 Terminal
## 📦 Extensions
SVG files can also be accessed directly from the terminal using [`svgls`](https://www.npmjs.com/package/svgls) CLI.
A list of extensions that use the [svgl API](https://svgl.app/api), created by the community:
#### Quick start
If you are using yarn or npm, run this command:
```bash
npx svgls add
# or
pnpm dlx svgls add
```
For more details, check out the [GitHub repository](https://github.com/sujjeee/svgls) created by [sujjeee](https://twitter.com/sujjeeee).
| Extension | Description | Created by | Link |
| -------------- | -------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------- |
| svgls | A CLI for easily adding SVG icons to your project. | [sujjeee](https://twitter.com/sujjeeee) | [Repository](https://github.com/sujjeee/svgls) |
| SVGL for Figma | Add svgs from svgl to your Figma project. | [quilljou](https://twitter.com/quillzhou) | [Figma Plugin](https://www.figma.com/community/plugin/1320306989350693206/svgl) |
## ✌️ Contributing

View File

@ -24,8 +24,8 @@
external: false
},
{
name: 'Terminal',
url: 'https://github.com/pheralb/svgl?tab=readme-ov-file#-terminal',
name: 'Extensions',
url: 'https://github.com/pheralb/svgl?tab=readme-ov-file#-extensions',
icon: ArrowUpRight,
external: true
},

View File

@ -1,10 +1,10 @@
import { Redis } from '@upstash/redis';
import { Ratelimit } from '@upstash/ratelimit';
import { UPSTASH_REDIS_REST_TOKEN, UPSTASH_REDIS_REST_URL, SVGL_API_REQUESTS } from '$env/static/private';
import { UPSTASH_REDIS_TOKEN, UPSTASH_REDIS_URL, SVGL_API_REQUESTS } from '$env/static/private';
const redis = new Redis({
url: UPSTASH_REDIS_REST_URL,
token: UPSTASH_REDIS_REST_TOKEN
url: UPSTASH_REDIS_URL,
token: UPSTASH_REDIS_TOKEN
});
export const ratelimit = new Ratelimit({