create book

This commit is contained in:
Nebel 2022-02-22 17:45:22 +09:00
parent b70eb58709
commit edc46bdff2
18 changed files with 1414 additions and 1 deletions

View file

@ -7,6 +7,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with: { node-version: lts/*, cache: yarn }
- id: brew_cache
run: echo "::set-output name=dir::$(brew --cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.brew_cache.outputs.dir }}
key: brew-${{ hashFiles('**/Brewfile.lock.json') }}
restore-keys: brew-
- name: Installing dependencies
run: |
yarn install
brew bundle
- name: Git config
run: |
git config user.name bot
@ -14,7 +27,8 @@ jobs:
- name: Build
run: |
git subtree add --prefix pages origin gh-pages
npx @marp-team/marp-cli README.md -o pages/index.html
yarn build
mdbook build
- name: Publish
run: |
git add -f pages

1
.gitignore vendored
View file

@ -1 +1,2 @@
/pages/
/node_modules/

4
.prettierrc.yml Normal file
View file

@ -0,0 +1,4 @@
overrides:
- files: "*.md"
options:
parser: markdown-nocjsp

1
Brewfile Normal file
View file

@ -0,0 +1 @@
brew "mdbook"

55
Brewfile.lock.json Normal file
View file

@ -0,0 +1,55 @@
{
"entries": {
"brew": {
"mdbook": {
"version": "0.4.15",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:ce829c6916e6e0e92b87fc7b50d32717e425a34daeb599e91de63e82490139c5",
"sha256": "ce829c6916e6e0e92b87fc7b50d32717e425a34daeb599e91de63e82490139c5"
},
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:b5567150ceb34975ac1410a06d36a92652e37ededcf77bcc1487afe77b9669ec",
"sha256": "b5567150ceb34975ac1410a06d36a92652e37ededcf77bcc1487afe77b9669ec"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:275537af633a8a359d7109a0777c535ae1b2e36a07566c49b021589e8a8bfcf5",
"sha256": "275537af633a8a359d7109a0777c535ae1b2e36a07566c49b021589e8a8bfcf5"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:f7ea2bc7a6bb74fade5123e1e4523e1f49addca4730b5e61d66bb13feddf2e83",
"sha256": "f7ea2bc7a6bb74fade5123e1e4523e1f49addca4730b5e61d66bb13feddf2e83"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:a8a40fb27378a45e8543072fdb73036e6977d634d3d974834fa1208daca054a1",
"sha256": "a8a40fb27378a45e8543072fdb73036e6977d634d3d974834fa1208daca054a1"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mdbook/blobs/sha256:7e8a47e663ef70129e878cff9c43336e37d50739847cd2222995fedd5b684bd4",
"sha256": "7e8a47e663ef70129e878cff9c43336e37d50739847cd2222995fedd5b684bd4"
}
}
}
}
}
},
"system": {
"linux": {
"Ubuntu 20.04.4 LTS (focal)": {
"HOMEBREW_VERSION": "3.3.16-15-g6661f5b",
"HOMEBREW_PREFIX": "/home/linuxbrew/.linuxbrew",
"Homebrew/linuxbrew-core": "f9808921157b103d2499601d1b660fbcea526749",
"GCC": "9.3.0"
}
}
}
}

12
book.toml Normal file
View file

@ -0,0 +1,12 @@
[book]
language = "ja"
title = "Jestではじめるテスト"
authors = ["Kohei Watanabe"]
[build]
build-dir = "pages/book"
[output.html]
site-url = "/intro-to-software-testing/book/"
git-repository-url = "https://github.com/kou029w/intro-to-software-testing"
edit-url-template = "https://github.com/kou029w/intro-to-software-testing/edit/main/{path}"

14
package.json Normal file
View file

@ -0,0 +1,14 @@
{
"name": "@kou029w/intro-to-software-testing",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "marp README.md --output pages/index.html",
"format": "prettier --write ."
},
"devDependencies": {
"@marp-team/marp-cli": "^1.6.0",
"prettier": "^2.5.1",
"prettier-plugin-md-nocjsp": "^1.2.0"
}
}

17
src/README.md Normal file
View file

@ -0,0 +1,17 @@
# Jestではじめるテスト
## ローカル環境でのビルド
### 前提
- Ubuntu 20.04 LTS
- Homebrew
### 手順
下記のコマンドを実行すると `pages/book` ディレクトリ以下にファイルが生成されます。
```sh
brew bundle
mdbook build
```

10
src/SUMMARY.md Normal file
View file

@ -0,0 +1,10 @@
# 目次
- [テストの基本](basic.md)
- [Jest とは](about-jest.md)
- [事前準備](preparation.md)
- [はじめてのテスト](getting-started.md)
- [基本的な機能](basic-jest-api.md)
- [テストの実践 ――「うるう年」問題](leap-year.md)
- [テストの作法](test-writing-style.md)
- [Jest の機能](jest-api.md)

1
src/about-jest.md Normal file
View file

@ -0,0 +1 @@
# Jest とは

1
src/basic-jest-api.md Normal file
View file

@ -0,0 +1 @@
# 基本的な機能

1
src/basic.md Normal file
View file

@ -0,0 +1 @@
# テストの基本

1
src/getting-started.md Normal file
View file

@ -0,0 +1 @@
# はじめてのテスト

7
src/jest-api.md Normal file
View file

@ -0,0 +1,7 @@
# Jest の機能
## Matcher
## Promise
## beforeEach と afterEach

6
src/leap-year.md Normal file
View file

@ -0,0 +1,6 @@
# テストの実践 ――「うるう年」問題
<!--
- 目標を決める - グレゴリオ暦法におけるうるう年
- 西暦年号が4で割り切れる年はうるう年
- 残り課題 -->

1
src/preparation.md Normal file
View file

@ -0,0 +1 @@
# 事前準備

View file

@ -0,0 +1,3 @@
# テストの作法
## Arrange Act Assert

1264
yarn.lock Normal file

File diff suppressed because it is too large Load diff