Skip to content

Commit 646f84e

Browse files
chvmvdnakatermKaichiManabe
committed
Initial commit
Co-authored-by: Shogo NAKAMURA <104970808+naka-12@users.noreply.github.com> Co-authored-by: KaichiManabe <154493010+KaichiManabe@users.noreply.github.com>
0 parents  commit 646f84e

97 files changed

Lines changed: 19684 additions & 0 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
format:
11+
name: Format
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: latest
21+
cache: npm
22+
23+
- name: Install Packages
24+
run: npm ci
25+
shell: bash
26+
27+
- name: Format
28+
run: npm run format:check
29+
shell: bash
30+
31+
build:
32+
name: Build
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout Code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: latest
42+
cache: npm
43+
44+
- name: Install Packages
45+
run: npm ci
46+
shell: bash
47+
48+
- name: Build
49+
run: npm run build
50+
shell: bash

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches: main
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
pages: write
10+
id-token: write
11+
environment:
12+
name: github-pages
13+
url: ${{ steps.deployment.outputs.page_url }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- run: npm ci && npm run build
19+
- uses: actions/upload-pages-artifact@v2
20+
with:
21+
path: build
22+
- id: deployment
23+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

.nvmrc

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

.prettierrc.json

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

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 ut.code();
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# ut.code(); Starter
2+
3+
<img alt="" src="./static/img/logo.svg" height="200px" />
4+
5+
[![language: MDX](https://img.shields.io/badge/MDX-1B1F24.svg?logo=mdx)](https://mdxjs.com/)
6+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
7+
![license: MIT](https://img.shields.io/badge/license-MIT-informational.svg)
8+
![PRs: welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
9+
10+
[ut.code(); Starter](https://starter.utcode.net/) は、[ut.code();](https://utcode.net/) によって作られた Web プログラミングを学ぶための入門教材です。
11+
さらに、高度な内容は [ut.code(); Learn](https://learn.utcode.net/) で学ぶことができます。
12+
13+
## 目次
14+
15+
- [開発](#開発)
16+
- [要件](#要件)
17+
- [環境構築](#環境構築)
18+
- [開発用サーバーの起動](#開発用サーバーの起動)
19+
- [ディレクトリ構成](#ディレクトリ構成)
20+
- [カスタムコンポーネント](#カスタムコンポーネント)
21+
- [コミットの前に](#コミットの前に)
22+
- [貢献](#貢献)
23+
24+
## 開発
25+
26+
### 要件
27+
28+
- [Node.js](https://nodejs.org/ja/)
29+
- [npm](https://www.npmjs.com/)
30+
31+
### 環境構築
32+
33+
```shell
34+
npm ci
35+
```
36+
37+
### 開発用サーバーの起動
38+
39+
```shell
40+
npm start
41+
```
42+
43+
### ディレクトリ構成
44+
45+
`docs` フォルダ下に作られたファイルは自動でホスティングされます。
46+
`index.mdx` というファイルを編集することで、変更ができます。編集したい階層にある `index.mdx` ファイルを選んで編集してください。
47+
`index.mdx` は Markdown を拡張した MDX という非常に簡単な形式で書かれています。
48+
49+
### カスタムコンポーネント
50+
51+
ut.code(); Learn では、次のカスタムコンポーネントが定義されています。
52+
53+
- Term - 用語にポップアップの説明を付ける
54+
- Answer - 解答例を折りたたんで隠す
55+
- ViewSource - GitHub と CodeSandbox で解答例を表示するボタンを表示する
56+
57+
### コミットの前に
58+
59+
コミットの前に、
60+
61+
```shell
62+
npm run format
63+
```
64+
65+
でフォーマットして、
66+
67+
```shell
68+
npm run build
69+
```
70+
71+
でビルドが通ることを確認してください。
72+
73+
## ライセンス
74+
75+
ut.code(); Learn は [MIT license](https://github.com/ut-code/utcode-starter/blob/master/LICENSE) でライセンスされています。
76+
Copyright © 2023 ut.code();.
77+
78+
## 貢献
79+
80+
Issue や Pull request などはいつでもお待ちしています。
81+
82+
## リリースについて
83+
84+
GitHub の Release を作成すると GitHub Pages にデプロイされます。

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
3+
};

0 commit comments

Comments
 (0)