Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
src/paraglide/
*.tsbuildinfo
.DS_Store
.env
Expand Down
7 changes: 5 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

pnpm workspace で、実行したい package と script をルートから選んで実行します。
使うのは既存の `package.json` scripts だけです。
prompt や error message はシステム locale に合わせて表示されます。
現在サポートしている locale は英語 (`en`) と日本語 (`ja`) です。
未対応の locale は英語にフォールバックします。

## インストール

Expand Down Expand Up @@ -63,12 +66,12 @@ package と script が特定できれば、そのまま実行します。

```text
$ prw
? Select package
? パッケージを選択
❯ (root)
@myapp/web apps/web
@myapp/api apps/api

? Select script
? スクリプトを選択
❯ dev
build
test
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ English | [日本語](./README.ja.md)

`prw` lets you pick a package and a script from your pnpm workspace root, then runs it.
It only uses scripts already defined in `package.json`.
Prompt and error messages follow your system locale.
Currently supported locales are English (`en`) and Japanese (`ja`).
Unsupported locales fall back to English.

## Installation

Expand Down Expand Up @@ -73,6 +76,8 @@ $ prw
test
```

With a Japanese locale, the prompts and errors are shown in Japanese.

## Workspace Layout

```text
Expand Down
10 changes: 10 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"select_package": "Select package",
"select_script": "Select script",
"cancelled": "Cancelled.",
"no_packages_match": "No packages match: {query}",
"multiple_packages_match": "Multiple packages match: {query}. Be more specific.",
"no_scripts_in_package": "No scripts in {packageName}",
"workspace_root_required": "Run prw from workspace root.",
"package_not_found": "Package \"{selected}\" not found"
}
10 changes: 10 additions & 0 deletions messages/ja.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"select_package": "パッケージを選択",
"select_script": "スクリプトを選択",
"cancelled": "キャンセルしました。",
"no_packages_match": "一致するパッケージがありません: {query}",
"multiple_packages_match": "一致するパッケージが複数あります: {query}。より具体的に指定してください。",
"no_scripts_in_package": "{packageName} にスクリプトがありません",
"workspace_root_required": "ワークスペースのルートで prw を実行してください。",
"package_not_found": "パッケージ \"{selected}\" が見つかりません"
}
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"prw": "./dist/bin.mjs"
},
"scripts": {
"build": "tsdown",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"test": "vitest",
"paraglide:compile": "paraglide-js compile --strategy globalVariable baseLocale --emit-ts-declarations",
"build": "pnpm paraglide:compile && tsdown",
"typecheck": "pnpm paraglide:compile && tsgo --noEmit -p tsconfig.json",
"test": "pnpm paraglide:compile && vitest",
"knip": "knip",
"prepublishOnly": "pnpm build",
"changeset": "changeset",
Expand Down Expand Up @@ -59,6 +60,7 @@
"devDependencies": {
"@biomejs/biome": "2.4.0",
"@changesets/cli": "2.30.0",
"@inlang/paraglide-js": "^2.15.0",
"@types/js-yaml": "^4.0.9",
"@types/node": "^24.12.0",
"@typescript/native-preview": "7.0.0-dev.20260313.1",
Expand All @@ -73,6 +75,7 @@
"@clack/prompts": "^1.1.0",
"fast-glob": "^3.3.3",
"js-yaml": "^4.1.1",
"os-locale": "^8.0.0",
"picocolors": "^1.1.1"
}
}
Loading
Loading