Skip to content

Commit 53bd1b4

Browse files
sangun-kangclaude
andcommitted
docs: split README for npm consumers and move dev commands to CONTRIBUTING.md
The README ships with the npm tarball and becomes the package landing page on npmjs.com. Keeping developer-only commands (storybook, build, typecheck, lint, lint:staged) there was misleading since consumers install from npm, receive only dist/, and cannot run any of those scripts. - README.md: consumer-only (install, peer deps, usage, flavor list, link to CONTRIBUTING). This is what the npmjs.com page and GitHub home render. - CONTRIBUTING.md: repo setup, dev commands, release flow (local npm publish), project structure. Not included in the tarball (files: ["dist"]) so it stays a GitHub-only contributor doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fafebf1 commit 53bd1b4

2 files changed

Lines changed: 46 additions & 15 deletions

File tree

CONTRIBUTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Contributing to wip-ui
2+
3+
本ドキュメントはこのリポジトリで開発する人向けです。npm 経由で `wip-ui` を利用するだけの場合は [`README.md`](./README.md) を参照してください。
4+
5+
## セットアップ
6+
7+
```bash
8+
git clone git@github.com:pepabo/wip-ui.git
9+
cd wip-ui
10+
npm install
11+
```
12+
13+
## コマンド
14+
15+
| コマンド | 説明 |
16+
|---------|------|
17+
| `npm run storybook` | Storybook 開発サーバー起動 (port 6006) |
18+
| `npm run build-storybook` | Storybook ビルド (`storybook-static/`) |
19+
| `npm run build` | ライブラリのビルド (`dist/js/` + `dist/css/`) |
20+
| `npm run typecheck` | TypeScript 型チェック |
21+
| `npm run lint` | 型チェック + Biome チェック |
22+
| `npm run lint:fix` | Biome による自動修正 |
23+
| `npm run lint:staged <files>` | Biome による lint(ステージング対象) |
24+
25+
## リリース
26+
27+
Maintainer のみ。公開 npm への publish はローカルから実行します:
28+
29+
```bash
30+
npm whoami # 公開 npm にログイン済みか確認
31+
npm version <patch|minor|major> # package.json の version を更新 + commit + tag
32+
npm publish # 公開 npm へ公開(2FA が有効な場合 OTP を要求)
33+
git push --follow-tags # 新しい tag を origin にも push
34+
```
35+
36+
より詳しい運用ポリシー(オーナー構成、トークン管理、障害対応等)は社内ドキュメントを参照してください。
37+
38+
## 構造
39+
40+
- `src/<Component>/*` — 各コンポーネント(React + SCSS)
41+
- `src/_all.scss` — 全コンポーネント SCSS のエントリ
42+
- `scripts/build-js.mjs` — TypeScript コンパイル + `.scss` import のストリップ
43+
- `scripts/build-flavor-css.mjs` — フレーバーごとに SCSS をコンパイルし `[data-flavor="xxx"]` でスコープ化。`all.css`(全フレーバー結合)も生成。Inhouse Icons woff2 を base64 で埋め込み
44+
- `.storybook/` — Storybook 設定とフレーバー別プレビュー CSS

README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,9 @@ import { Button } from 'wip-ui/Button'
6565

6666
> **バンドルサイズを最適化したい場合**: 単一フレーバーのみ利用する場合は、`all.css` の代わりに `wip-ui/css/{flavor}.css` を読み込むこともできます。その場合は `FlavorProvider``flavor` と必ず一致させてください。
6767
68-
## 開発
68+
## Contributing
6969

70-
```bash
71-
npm install
72-
```
73-
74-
### コマンド
75-
76-
| コマンド | 説明 |
77-
|---------|------|
78-
| `npm run storybook` | Storybook 開発サーバー起動 (port 6006) |
79-
| `npm run build-storybook` | Storybook ビルド |
80-
| `npm run build` | ライブラリのビルド(dist/ 出力) |
81-
| `npm run typecheck` | TypeScript 型チェック |
82-
| `npm run lint` | 型チェック + Biome チェック |
83-
| `npm run lint:staged <files>` | Biome による lint(ステージング対象) |
70+
リポジトリのセットアップ方法・開発コマンドは [`CONTRIBUTING.md`](./CONTRIBUTING.md) を参照してください。
8471

8572
## License
8673

0 commit comments

Comments
 (0)