Skip to content

Commit

Permalink
Merge pull request #39 from pheralb/v3
Browse files Browse the repository at this point in the history
🚀 v3
  • Loading branch information
pheralb committed Mar 20, 2023
2 parents 494d2b5 + 33dd53e commit b5a505c
Show file tree
Hide file tree
Showing 269 changed files with 1,968 additions and 2,531 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: pheralb
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🛠️ Check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
svelte-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm install

- name: Run typecheck
run: npm run check
56 changes: 15 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,22 @@
# dependencies ->
/node_modules
/.pnp
.pnp.js
# Dependencies
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock

# testing ->
/coverage

# next.js ->
/.next/
/out/

# production ->
# Folders
/.svelte-kit
/build
/package

# misc ->
# Logs
.DS_Store
*.pem

# debug ->
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files ->
.env*.local

# vercel ->
.vercel
# Environment variables
.env
.env.*
!.env.example

# typescript ->
*.tsbuildinfo

# PWA files ->
**/public/sw.js
**/public/workbox-*.js
**/public/worker-*.js
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map

# SWC files ->
.swc

# PNPM files ->
pnpm-lock.yaml
# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "svelte.svelte-vscode"]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"tailwindCSS.experimental.classRegex": [["[\"'`]([^\"'`]*).*?[\"'`]"]]
}
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Pablo Hernández
Copyright (c) 2022 Pablo Hdez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
143 changes: 69 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,103 @@
<p align="center">
<a href="https://svgl.vercel.app/" target="_blank">
<img src="https://i.postimg.cc/1tzrP2rg/banner-corner.png" width="800px" alt="SVGL Banner" />
</a>
<div align="center">
<a href="https://svgl.vercel.app">
<img src="static/images/screenshot.png">
</a>
<p></p>
</div>

<div align="center">
<a href="https://svgl.vercel.app/" target="_blank">
Discover
</a>
<span>&nbsp;●&nbsp;</span>
<a href="#-getting-started">
Submit logo
</a>
<span>&nbsp;●&nbsp;</span>
<a href="#%EF%B8%8F-stack">
Stack
</a>
<span>&nbsp;●&nbsp;</span>
<a href="#%EF%B8%8F-contributing">
Contributing
</a>
</div>

</p>

## 📦 Packages:
<div align="center">

- ⚡️ [Nextjs](https://nextjs.org/) - The React Framework for Production.
- ⚒️ [React 18](https://reactjs.org/) - A JavaScript library for building user interfaces.
- 💙 [Typescript](https://www.typescriptlang.org/) - A superset of JavaScript.
-[Vitest](https://vitest.dev/) - A blazing fast unit test framework.
- 💅 [Chakra UI](https://chakra-ui.com/) - Create accessible React apps with speed.
- 💥 [Framer Motion](https://www.framer.com/motion/) - Production-ready motion library.
- 💖 [Phosphor Icons](https://phosphoricons.com/) - A flexible icon family for everyone.
- ⬇️ [Next-PWA](https://github.com/shadowwalker/next-pwa) - Zero config PWA plugin for Next.js, with workbox.
[![GitHub actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpheralb%2Fsvgl%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/pheralb/svgl/goto?ref=main)
![GitHub stars](https://img.shields.io/github/stars/pheralb/svgl)
![GitHub issues](https://img.shields.io/github/issues/pheralb/svgl)
![GitHub forks](https://img.shields.io/github/forks/pheralb/svgl)
![GitHub license](https://img.shields.io/github/license/pheralb/svgl)
![GitHub PRs](https://img.shields.io/github/issues-pr/pheralb/svgl)

## 🚀 Getting started:
</div>

You need:
## 🛠️ Stack

- [Node.js 16+ (recommend: 16.15.1 LTS)](https://nodejs.org/en/)
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [**Sveltekit**](https://kit.svelte.dev/) - Web development, streamlined.
- [**Typescript**](https://www.typescriptlang.org/) - JavaScript with syntax for types.
- [**Tailwindcss**](https://tailwindcss.com/) - A utility-first CSS framework for rapidly building custom designs.
- [**Prettier**](https://prettier.io/) + [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) - An opinionated code formatter.
- [**phosphor-svelte**](https://github.com/haruaki07/phosphor-svelte) - A clean and friendly icon family for Svelte.
- [**Vitest**](https://vitest.dev/) - Blazing Fast Unit Test Framework.

1. Clone the repository:
## 🚀 Getting Started

```bash
[email protected]:pheralb/svgl.git
```
You will need:

2. Install dependencies:
- [Node.js 16+ (recommended 18 LTS)](https://nodejs.org/en/).
- [Git](https://git-scm.com/).

```bash
npm install
# or
yarn install
```

3. Run:
1. Clone or [fork](https://github.com/pheralb/svgl/fork) this repository:

```bash
npm run dev
# or
yarn dev
git clone [email protected]:pheralb/svgl.git
```

4. Test & Build:
2. Install dependencies with your favorite package manager:

```bash
npm run ready
# or
yarn ready
```

Open [localhost:3000](localhost:3000) with your browser to see the result.

## 🤔 Can I add my logo?

Yes! Here is a guide for you 🥳:
# with npm:
npm install

1. [Fork the repository](https://github.com/pheralb/svgl/fork).
# with pnpm:
pnpm install

2. Clone the forked repository:
# with ultra:
ultra install

```bash
[email protected]:YOUR_USERNAME/svgl.git
# with yarn:
yarn install
```

3. Add the **.svg** logo here: [`/public/library`](https://github.com/pheralb/svgl/tree/main/public/library).
3. Go to the [**`static/library`**](https://github.com/pheralb/svgl/blob/main/static/library) folder and add your `.svg` logo. Remember to optimize SVG for web use, you can use [SVGOMG](https://jakearchibald.github.io/svgomg/).

4. Add your logo information here following the structure: [`/data/svgs.json`](https://github.com/pheralb/svgl/blob/main/data/svgs.json).
4. Go to the [**`src/data/svgs.ts`**](https://github.com/pheralb/svgl/blob/main/src/data/svgs.ts) and add the information about your logo, following the structure:

```json
{
"id": 1,
"slug": "/library/your_logo.svg",
"title": "Logo Title",
"category": "Logo Category",
"url": "Your Website / app url"
}
"title": "Title",
"category": "Category",
"route": "/library/your_logo.svg",
"url": "Website"
},
```

5. Create a commit and push:
And create a pull request with your logo 🚀.

```bash
git add .
git commit -m "🥰 Added my logo"
git push origin main
```

6. Create a pull request with your changes and 🥳 ready.

## 🚂 Api endpoints:

```bash
- /api/all: returns all the logos.
- /api/search?id=2: returns the logo with id 2.
- /api/search?q=logo: returns the logo with query.
```
## ✌️ Contributing

## ⚒️ Shortcuts:
<a href="https://github.com/pheralb/svgl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=pheralb/svgl" />
</a>

- ⭐ SVG Library: [/public/library/](https://github.com/pheralb/svgl/tree/main/public/library).
- ✍️ SVG JSON logos: [/data/](https://github.com/pheralb/svgl/tree/main/data).
<p></p>

## 🔑 License:
## 🔑 License

- [MIT](https://github.com/pheralb/svgl/blob/main/LICENSE).
Loading

1 comment on commit b5a505c

@vercel
Copy link

@vercel vercel bot commented on b5a505c Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svgl – ./

svgl-pheralb.vercel.app
svgl.vercel.app
svgl-git-main-pheralb.vercel.app

Please sign in to comment.