Skip to content

Commit 2741268

Browse files
authored
Website version epoch -> 3 (#209)
1 parent e79e3cb commit 2741268

File tree

573 files changed

+3198
-26566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+3198
-26566
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// https://github.com/devcontainers/templates/tree/main/src/javascript-node
2+
// TODO: I don't use devcontainer, someone check if this works
23
{
3-
"name": "Node.js",
4-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
5-
"forwardPorts": [8000],
6-
"updateContentCommand": "npm ci",
7-
"postAttachCommand": "npm run develop",
8-
"portsAttributes": { "8000": { "onAutoForward": "openPreview" } },
4+
"name": "ut.code(); Website",
5+
"image": "ghcr.io/nhaef/devcontainer-bun:latest",
6+
"forwardPorts": [4321],
7+
"updateContentCommand": "bun i --frozen-lockfile",
8+
"postAttachCommand": "bun dev",
9+
"portsAttributes": { "4321": { "onAutoForward": "openPreview" } },
910
"customizations": {
1011
"vscode": {
1112
"extensions": ["dbaeumer.vscode-eslint", "apollographql.vscode-apollo"]

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.envrc.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# if you are using nix
2+
use flake || use nix

.github/workflows/check.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
name: Check
22
on: pull_request
33
jobs:
4-
build-type-check:
5-
name: Build and Type Check
4+
check:
5+
name: Check
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v3
9-
- uses: actions/setup-node@v3
9+
- uses: oven-sh/setup-bun@v2
1010
with:
11-
node-version: "18"
12-
cache: npm
13-
- run: npm ci
14-
- uses: actions/cache@v3
15-
with:
16-
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
17-
path: |
18-
.cache
19-
public
20-
restore-keys: ${{ runner.os }}-gatsby-build-
21-
- run: npm run build
22-
- run: npm run type-check
23-
24-
lint:
25-
name: Lint
11+
bun-version: "1.2.4"
12+
- run: bun install --frozen-lockfile
13+
- run: bun check
14+
build:
15+
name: Build
2616
runs-on: ubuntu-latest
2717
steps:
2818
- uses: actions/checkout@v3
29-
- uses: actions/setup-node@v3
19+
- uses: oven-sh/setup-bun@v2
3020
with:
31-
node-version: "18"
32-
cache: npm
33-
- run: npm ci
34-
- run: npm run lint
21+
bun-version: "1.2.4"
22+
- run: bun install --frozen-lockfile
23+
- uses: actions/cache@v4
24+
with:
25+
key: ${{ runner.os }}-astro-build
26+
path: |
27+
.astro
28+
dist
29+
node_modules/.astro/assets
30+
restore-keys: ${{ runner.os }}-astro-build
31+
- run: bun run build

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
node_modules/
1+
/node_modules/
22

33
# artifact
4-
.cache/
5-
public
4+
/.astro/
5+
/dist
66
src/gatsby-types.d.ts
7+
dist
78

89
# editor
910
.DS_Store
1011
.vscode/*
1112
!.vscode/extensions.json
1213

1314
# env
14-
.envrc
1515
.direnv
16-
shell.nix
16+
.envrc

.helix/languages.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[language-servers]
2+
astro-ls = { command = "astro-ls", args = ["--stdio"] }
3+
4+
[[language]]
5+
name = "astro"
6+
formatter = { command = "bun", args = ["prettier", "--parser", "astro"] }
7+
language-servers = ["astro-ls", "tailwindcss-ls"]
8+
9+
[[language]]
10+
name = "typescript"
11+
formatter = { command = "bun", args = ["prettier", "--parser", "typescript"] }
12+
13+
[[language]]
14+
name = "svelte"
15+
formatter = { command = "bun", args = ["prettier", "--parser", "svelte"] }
16+
auto-format = true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
contents

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugins:
2+
- prettier-plugin-astro
3+
- prettier-plugin-svelte
4+
- prettier-plugin-tailwindcss
5+
overrides:
6+
- files: "*.astro"
7+
options:
8+
parser: "astro"
9+
- files: "*.svelte"
10+
options:
11+
parser: "svelte"

.vscode/extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{ "recommendations": ["dbaeumer.vscode-eslint", "apollographql.vscode-apollo"] }
1+
{
2+
"recommendations": ["astro-build.astro-vscode"]
3+
}

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# ut.code(); 公式ウェブサイト
22

3+
## 環境構築
4+
5+
### devcontainer
6+
37
下のボタンを押すと開発環境が起動します。
48
起動までしばらく時間がかかるのでお待ちください。
59

610
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ut-code/website)
711

8-
## 環境構築 (手動)
12+
### 手動
913

10-
- (必須) Node.js v18
11-
- (推奨) VSCode
12-
- [ESLint 拡張機能](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
13-
- [Apollo 拡張機能](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo)
14+
- (必須) Bun >= v1.1.39
15+
- 任意のエディタ https://docs.astro.build/en/editor-setup/
1416

1517
```shell
16-
npm ci
18+
bun install --frozen-lockfile
1719
```
1820

1921
## 開発
2022

2123
```shell
22-
npm start
24+
bun dev
2325
```
2426

25-
<http://localhost:8000/> で開発用サーバーが起動します。
27+
<http://localhost:4321/> で開発用サーバーが起動します。
2628

2729
## ビルド
2830

2931
```shell
30-
npm run build
32+
bun run build
3133
```
3234

3335
## ディレクトリ構造

0 commit comments

Comments
 (0)