Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adamelliotfields committed Feb 14, 2024
0 parents commit e821edc
Show file tree
Hide file tree
Showing 20 changed files with 3,178 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:20

# add bun bin to path
ENV PATH "/home/node/.bun/bin:${PATH}"

# set node user/group
USER 1000:1000

# install bun v1.0.23
RUN curl -fsSL https://bun.sh/install | bash -s 'bun-v1.0.23'

# workdir
WORKDIR /workspaces/chat

# ports
EXPOSE 5173
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "chat",
"build": {
"dockerfile": "Dockerfile"
},
"forwardPorts": [5173],
"customizations": {
"vscode": {
"extensions": ["biomejs.biome", "bradlc.vscode-tailwindcss"]
}
},
"containerEnv": {
"GH_TOKEN": "${localEnv:GH_TOKEN}"
}
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build

on:
workflow_dispatch: {}
push:
branches: ['main']

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.0.23'
- name: Install deps
run: bun install --frozen-lockfile
- name: Lint with Biome
run: bun run lint
- name: Build with Vite
run: bun run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.swc
dist
node_modules
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11.0
5 changes: 5 additions & 0 deletions .postcssrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": {
"tailwindcss": {}
}
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["biomejs.biome", "bradlc.vscode-tailwindcss"],
"unwantedRecommendations": []
}
25 changes: 25 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"editor.quickSuggestions": { "strings": "on" },
"editor.rulers": [88],
"files.associations": { "*.css": "tailwindcss" },
"tailwindCSS.classAttributes": ["class", "className", "classes", "classNames"],

"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"[json][jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}
},
"[markdown]": {
"editor.wordWrap": "on"
}
}
42 changes: 42 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["dist", "node_modules"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 88
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingComma": "none"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"useRegexLiterals": "off"
},
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"suspicious": {
"noArrayIndexKey": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
Binary file added bun.lockb
Binary file not shown.
Binary file added demo.mp4
Binary file not shown.
Loading

0 comments on commit e821edc

Please sign in to comment.