Skip to content

Commit

Permalink
chore: 使用しているソフトウェアライセンスの一覧を成果物に含める (#341)
Browse files Browse the repository at this point in the history
* chore: 使用しているソフトウェアライセンスの一覧を成果物に含める
- 生成するための説明を更新
- 成果物をgit管理やlintから無視
- chibichiloの license, repositoryの反映
* fix: use yarn licenses generate-disclaimer
* fix: devDependenciesが含まれない問題の対処

Co-authored-by: Kimiaki Kuno <knokmki612@gmail.com>
  • Loading branch information
kou029w and knokmki612 authored Mar 23, 2021
1 parent cc81e67 commit 99bbfaf
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 13 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules/
/openapi/
/public/api/v2/swagger/
/public/storybook/
/public/LICENSE
/utils/$path.ts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/eslint_report.json
/public/api/v2/swagger/
/public/storybook/
/public/LICENSE
/utils/$path.ts
node_modules/
.env*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules/
/eslint_report.json
/public/api/v2/swagger/
/public/storybook/
/public/LICENSE
/server/dist/
/server/prisma/json-schema.json
/server/prisma/migrations/
Expand Down
42 changes: 34 additions & 8 deletions INSTALL-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,50 @@ API の接続先の情報を変更する場合 .env を適宜書き換える必

### ビルド

以下のコマンドを実行
次のコマンドを実行し、フロントエンドの静的ファイルを生成し配置します

```sh
yarn && yarn build
git clone https://github.com/npocccties/ChibiCHiLO.git
cd ChibiCHiLO
yarn
yarn build
```

### Storybook
server/dist ディレクトリ以下にファイルが作られれば成功です。

### 成果物のファイル構造

いくつかの UI をブラウザで確認するには `yarn` 実行後、以下のコマンドを実行。
```
server/dist
├── index.js … サーバーを起動するためのエントリーポイント
├── public
│ ├── LICENSE … 使用しているソフトウェアライセンスの詳細
│ ├── logo.png … ロゴ
│ ├── storybook/* … Storybook のためのファイル群
│ └── ...
└── ...
```

### 使用しているソフトウェアライセンスの詳細

使用しているソフトウェアライセンスの詳細を取得するには `yarn` 実行後、以下のコマンドを実行します。

```sh
yarn storybook
yarn build:license
```

## カスタマイズ
成功すると CSV ファイル `public/LICENSE.csv` が得られます。

### ロゴ

アプリケーションバーに表示するロゴを変更するにはビルド実行前に `./public/logo.png` をコピー等で上書きする
アプリケーションバーに表示するロゴ画像を変更するには `public/logo.png` を上書き後、ビルドします

最大幅100px、最大高さ48pxの範囲でアスペクト比を維持してリサイズされるので、それを考慮して用意すること。
ロゴ画像は最大幅 100px、最大高さ 48px の範囲でアスペクト比を維持してリサイズされます。

### Storybook

いくつかの UI をブラウザで確認するには `yarn` 実行後、以下のコマンドを実行します。

```sh
yarn storybook
```
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"main": "index.js",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/npocccties/ChibiCHiLO"
},
"workspaces": [
"server"
],
Expand Down Expand Up @@ -70,15 +74,16 @@
"compile": "run-p compile:*",
"compile:prisma": "yarn --cwd server build:prisma",
"compile:pathpida": "pathpida",
"build": "run-s compile build:frontend build:export build:server",
"build:frontend": "run-p build:{storybook,next}",
"build": "run-s compile build:static build:export build:server",
"build:static": "run-p build:{license,storybook,next}",
"build:license": "NODE_ENV=development yarn licenses generate-disclaimer > public/LICENSE",
"build:storybook": "build-storybook -o public/storybook",
"build:next": "next build",
"build:export": "next export -o server/dist/public",
"build:server": "yarn --cwd server build:app",
"build:openapi": "openapi-generator-cli generate -i http://localhost:8080/api/v2/swagger/json -g typescript-fetch -o openapi",
"start": "yarn --cwd server start",
"vercel-build": "run-s compile build:frontend build:server && rm -rf public/api/v2/swagger && mkdir -p public/api/v2/swagger && cp -a server/dist/static public/api/v2/swagger/static",
"vercel-build": "run-s compile build:static build:server && rm -rf public/api/v2/swagger && mkdir -p public/api/v2/swagger && cp -a server/dist/static public/api/v2/swagger/static",
"format": "prettier --write .",
"lint": "run-s compile 'lint:eslint {@}' --",
"lint:eslint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
7 changes: 5 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"name": "chibichilo-server",
"version": "2.1.0",
"main": "main.ts",
"author": "Kohei Watanabe <kou029w@gmail.com>",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/npocccties/ChibiCHiLO",
"directory": "server"
},
"scripts": {
"test": "jest",
"dev": "run-p dev:*",
Expand Down

1 comment on commit 99bbfaf

@vercel
Copy link

@vercel vercel bot commented on 99bbfaf Mar 23, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.