Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Vercel app for onefetch with ASCII preview #701

Merged
merged 70 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
651ccf2
Create folder for vercel app
spenserblack Jul 15, 2022
d28934c
Ignore vercel directory for CI
spenserblack Jul 15, 2022
fe0a333
Merge remote-tracking branch 'upstream/main'
o2sh Jul 15, 2022
3bdc8c2
Merge remote-tracking branch 'upstream/main'
o2sh Jul 15, 2022
d9e3cb2
Exclude contents of vercel folder from package
spenserblack Jul 16, 2022
434866b
Merge remote and local
spenserblack Jul 16, 2022
c95a586
Initialize Svelte+TS project
spenserblack Jul 16, 2022
add2e43
Add API endpoint for getting all languages
spenserblack Jul 16, 2022
d0f920b
Convert YAML to JSON in build
spenserblack Jul 16, 2022
0d19df7
Add API endpoint for getting a single language
spenserblack Jul 16, 2022
74a9edd
Don't stringify JSON before responding
spenserblack Jul 16, 2022
53d597e
Add function to get language data
spenserblack Jul 18, 2022
39ebcc5
Pluralize API
spenserblack Jul 18, 2022
4ddabac
Add some styling with a simple navbar
spenserblack Jul 18, 2022
3fa609c
Add route to ASCII preview
spenserblack Jul 18, 2022
dc22780
Colorize ASCII previews
spenserblack Jul 19, 2022
e90fda9
Create Vercel app with ASCII preview
spenserblack Jul 19, 2022
fedbb77
Reduce vertical spacing in ASCII previews
spenserblack Jul 19, 2022
f30ebed
Add installation instructions to homepage
spenserblack Jul 19, 2022
1a11f9b
Set type of key parameter
spenserblack Jul 20, 2022
9f354a6
Fix incorrect response value
spenserblack Jul 20, 2022
b399750
Darken background of dark preview
spenserblack Jul 20, 2022
ad93cdf
Display colored chip next to name in preview
spenserblack Jul 21, 2022
0fe081e
Move chip out of `<h3>`
spenserblack Jul 21, 2022
819d88f
Add language count to preview header
spenserblack Jul 21, 2022
ff57618
Fix chip on different line than title
spenserblack Jul 21, 2022
4cc5d65
remove unused div
o2sh Jul 22, 2022
58601d0
fix hyperlink
o2sh Jul 22, 2022
0f104be
remove useless css class
o2sh Jul 22, 2022
655e148
remove bg color of nav
o2sh Jul 22, 2022
083f871
remove unused div
o2sh Jul 22, 2022
ddc0850
remove app.css
o2sh Jul 22, 2022
85c975a
try to fix build
o2sh Jul 22, 2022
020c51e
bump sakura.css dep
o2sh Jul 22, 2022
f5ce56e
revert change on tsconfig.ts
o2sh Jul 22, 2022
959acbb
update tsconfig
o2sh Jul 22, 2022
d30407a
remove api
o2sh Jul 22, 2022
f36f610
directly read from yaml
o2sh Jul 22, 2022
2b75854
revert change on tsconfig
o2sh Jul 23, 2022
135589c
bg set to white when dark checkbox is false
o2sh Jul 23, 2022
6eb4443
remove yarn.lock
o2sh Jul 23, 2022
c054891
reorganize folders
o2sh Jul 23, 2022
16fde81
link sakura.css from HTML
o2sh Jul 23, 2022
e25e3d6
switch to black if not dark and color is white
o2sh Jul 23, 2022
aaaa764
only default to terminal fg color when ansi
o2sh Jul 24, 2022
b0a0f28
add .gitattributes file to exclude vercel from stats
o2sh Jul 24, 2022
1f7aed9
switch to language-documentation
o2sh Jul 24, 2022
b5ef4af
fix ally warning + type
o2sh Jul 25, 2022
16d1516
simplify logic for true color checkbox
o2sh Jul 25, 2022
22f00a9
run prettier on all files
o2sh Jul 26, 2022
770c70a
added eslint
o2sh Jul 26, 2022
8d29b9d
run prettier
o2sh Jul 26, 2022
63b7544
run prettier
o2sh Jul 27, 2022
486568d
static assets are served from root path
o2sh Jul 27, 2022
7b8a2ea
prettier on .svelte files
o2sh Jul 27, 2022
c93ef82
Resolve type error on YAML
spenserblack Jul 28, 2022
4001e80
Ignore `dist/`
spenserblack Jul 28, 2022
8edb82f
Make `languages.yaml` module pattern more specific
spenserblack Jul 28, 2022
0179115
use sakura earthly theme
o2sh Jul 28, 2022
9ce8e13
Add Vercel Deployment CI
spenserblack Jul 29, 2022
558ccdb
Fix labels for preview checkboxes
spenserblack Jul 29, 2022
506c9c0
Fix check step
spenserblack Jul 29, 2022
b64d590
Fix styling of labels
spenserblack Jul 29, 2022
7625a4a
Update vercel deployment (#148)
spenserblack Jul 29, 2022
d69c8f9
Make svelte-check more strict in CI
spenserblack Jul 29, 2022
dd02212
Rename main vercel CI job
spenserblack Jul 29, 2022
bdba257
Register Vercel subproject for dependabot
spenserblack Jul 29, 2022
90fcea0
fix alignement of label + checkbox
o2sh Jul 29, 2022
9a59136
add entry for vercel/ in CODEOWNERS
o2sh Jul 29, 2022
75c6e0c
fix svelte check
o2sh Jul 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vercel/** linguist-documentation
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/templates/language.rs @spenserblack
/src/info/deps/ @HallerPatrick @o2sh
/src/cli.rs @spenserblack @o2sh
/vercel/ @spenserblack
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: npm
directory: vercel
schedule:
interval: monthly
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths-ignore:
- "docs/**"
- "**.md"
- "vercel/**"
Copy link
Owner

Choose a reason for hiding this comment

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

This folder may need to be added to the exclude section of the Cargo.toml file.

pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "**.md"
- "vercel/**"

jobs:
build:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/vercel-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Vercel Deployment CI
on:
push:
branches: ["main"]
paths:
- "vercel/**"
pull_request:
branches: [main]
paths:
- "vercel/**"

jobs:
check:
name: Check Vercel Code Quality
runs-on: ubuntu-latest
defaults:
run:
working-directory: vercel

steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
cache-dependency-path: vercel/package-lock.json

- name: Install Dependencies
run: npm ci
# NOTE Since build is automated by vercel, it's probably
# redundant to test it here, too
- name: Svelte Check
run: npm run check -- --fail-on-warnings --fail-on-hints
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["o2sh <ossama-hjaji@live.fr>"]
categories = ["command-line-utilities"]
description = "Git repository summary on your terminal"
edition = "2018"
exclude = ["assets/*"]
exclude = ["assets/*", "vercel/*"]
keywords = [
"git",
"cli",
Expand Down
19 changes: 19 additions & 0 deletions vercel/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es6": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"plugins": ["svelte3"],
"extends": ["eslint:recommended"],
"overrides": [
{
"files": ["**/*.svelte"],
"processor": "svelte3/svelte3"
}
]
}
6 changes: 6 additions & 0 deletions vercel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
/node_modules
/build
/.vercel_build_output
.vercel
dist/
10 changes: 10 additions & 0 deletions vercel/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"useTabs": false,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSameLine": true,
"singleAttributePerLine": false,
"quoteProps": "consistent"
}
12 changes: 12 additions & 0 deletions vercel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Onefetch Web

## Development

```bash
# setup
## install dependencies
npm i

# run server with hot reloading
npm run dev
```
15 changes: 15 additions & 0 deletions vercel/ascii-preview/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/onefetch.ico" />
<link rel="stylesheet" href="/sakura.css" type="text/css" />
<title>Onefetch - ASCII Preview</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/routes/ascii-preview/main.ts"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions vercel/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/onefetch.ico" />
<link rel="stylesheet" href="/sakura.css" type="text/css" />
<title>Onefetch</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/routes/main.ts"></script>
</body>
</html>
Loading