@semba-ryuichiro/webpify 1.0.4 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,8 +2,24 @@
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen)](https://nodejs.org/)
5
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=semba-yui_webpify\&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=semba-yui_webpify)
6
+ [![DeepWiki](https://img.shields.io/badge/DeepWiki-semba--yui%2Fwebpify-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/semba-yui/webpify)
7
+ ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/semba-yui/webpify?utm_source=oss\&utm_medium=github\&utm_campaign=semba-yui%2Fwebpify\&labelColor=171717\&color=FF570A\&link=https%3A%2F%2Fcoderabbit.ai\&label=CodeRabbit+Reviews)
5
8
 
6
- 画像ファイル(PNG/JPEG/GIF)を WebP 形式に変換する CLI ツール
9
+ webpify は画像ファイル(PNG/JPEG/GIF)を WebP 形式に変換する CLI ツールです。
10
+
11
+ ## 目次
12
+
13
+ - [機能](#機能)
14
+ - [インストール](#インストール)
15
+ - [使い方](#使い方)
16
+ - [基本](#基本)
17
+ - [オプション](#オプション)
18
+ - [例](#例)
19
+ - [要件](#要件)
20
+ - [ライセンス](#ライセンス)
21
+ - [ドキュメント](#ドキュメント)
22
+ - [関連](#関連)
7
23
 
8
24
  ## 機能
9
25
 
@@ -37,16 +53,16 @@ webpify ./images -r
37
53
 
38
54
  ### オプション
39
55
 
40
- | オプション | 説明 | デフォルト |
41
- |-----------|------|-----------|
42
- | `-o, --output <dir>` | 出力先ディレクトリ | 入力と同じ |
43
- | `-q, --quality <n>` | 品質(1-100) | 100 |
44
- | `-r, --recursive` | 再帰的に処理 | false |
45
- | `-f, --force` | 既存ファイルを上書き | false |
46
- | `--list` | WebP ファイル一覧表示 | - |
47
- | `--quiet` | 統計情報を非表示 | false |
48
- | `-v, --version` | バージョン表示 | - |
49
- | `-h, --help` | ヘルプ表示 | - |
56
+ | オプション | 説明 | デフォルト |
57
+ | -------------------- | ------------- | ----- |
58
+ | `-o, --output <dir>` | 出力先ディレクトリ | 入力と同じ |
59
+ | `-q, --quality <n>` | 品質(1-100) | 100 |
60
+ | `-r, --recursive` | 再帰的に処理 | false |
61
+ | `-f, --force` | 既存ファイルを上書き | false |
62
+ | `--list` | WebP ファイル一覧表示 | - |
63
+ | `--quiet` | 統計情報を非表示 | false |
64
+ | `-v, --version` | バージョン表示 | - |
65
+ | `-h, --help` | ヘルプ表示 | - |
50
66
 
51
67
  ### 例
52
68
 
@@ -69,6 +85,12 @@ webpify ./images -r -f --quiet
69
85
 
70
86
  [MIT](LICENSE)
71
87
 
88
+ ## ドキュメント
89
+
90
+ - [クイックスタート](docs/getting-started.md) - インストールから最初の変換まで
91
+ - [コマンドリファレンス](docs/cli-reference.md) - すべてのオプションの詳細説明
92
+ - [ユースケース集](docs/use-cases.md) - 実践的な使用例とシナリオ
93
+
72
94
  ## 関連
73
95
 
74
96
  - [コントリビューションガイド](CONTRIBUTING.md)
@@ -24,7 +24,7 @@ const VERSION = '1.0.0';
24
24
  function parseQuality(value) {
25
25
  const quality = Number.parseInt(value, 10);
26
26
  if (Number.isNaN(quality) || quality < MIN_QUALITY || quality > MAX_QUALITY) {
27
- process.stderr.write(`error: Quality must be between ${MIN_QUALITY} and ${MAX_QUALITY}\n`);
27
+ process.stderr.write(`エラー: 品質は ${MIN_QUALITY} から ${MAX_QUALITY} の間で指定してください\n`);
28
28
  process.exit(1);
29
29
  }
30
30
  return quality;
@@ -37,15 +37,15 @@ export function createArgumentParser() {
37
37
  const program = new Command();
38
38
  program
39
39
  .name('webpify')
40
- .description('CLI tool to convert images to WebP format')
41
- .version(VERSION, '-v, --version', 'Show version number')
42
- .argument('[input]', 'Input file or directory path')
43
- .option('-o, --output <path>', 'Output path')
44
- .option('-q, --quality <number>', 'Quality level (1-100)', parseQuality, DEFAULT_QUALITY)
45
- .option('-r, --recursive', 'Process directories recursively', false)
46
- .option('-f, --force', 'Overwrite existing files', false)
47
- .option('--quiet', 'Silent mode (no output)', false)
48
- .option('--list', 'List WebP files with size information', false)
40
+ .description('画像を WebP 形式に変換する CLI ツール')
41
+ .version(VERSION, '-v, --version', 'バージョン番号を表示')
42
+ .argument('[input]', '入力ファイルまたはディレクトリのパス')
43
+ .option('-o, --output <path>', '出力パス')
44
+ .option('-q, --quality <number>', '品質レベル (1-100)', parseQuality, DEFAULT_QUALITY)
45
+ .option('-r, --recursive', 'ディレクトリを再帰的に処理', false)
46
+ .option('-f, --force', '既存ファイルを上書き', false)
47
+ .option('--quiet', 'サイレントモード(出力なし)', false)
48
+ .option('--list', 'WebP ファイルをサイズ情報付きで一覧表示', false)
49
49
  .configureOutput({
50
50
  writeErr: (str) => process.stderr.write(str),
51
51
  writeOut: (str) => process.stdout.write(str),
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -7,39 +7,39 @@
7
7
  "url": "https://github.com/semba-yui/webpify/issues"
8
8
  },
9
9
  "dependencies": {
10
- "commander": "14.0.2",
11
- "sharp": "0.34.5"
10
+ "commander": "catalog:",
11
+ "sharp": "catalog:"
12
12
  },
13
13
  "description": "CLI tool to convert images to WebP format",
14
14
  "devDependencies": {
15
- "@biomejs/biome": "2.3.10",
16
- "@commitlint/cli": "20.2.0",
17
- "@commitlint/config-conventional": "20.2.0",
18
- "@fast-check/vitest": "0.2.4",
19
- "@secretlint/secretlint-rule-preset-recommend": "11.2.5",
20
- "@stryker-mutator/core": "9.4.0",
21
- "@stryker-mutator/typescript-checker": "9.4.0",
22
- "@stryker-mutator/vitest-runner": "9.4.0",
23
- "@types/node": "25.0.3",
24
- "@vitest/coverage-v8": "4.0.16",
25
- "dependency-cruiser": "17.3.5",
26
- "fast-check": "4.5.3",
27
- "lefthook": "2.0.13",
28
- "remark": "15.0.1",
29
- "remark-cli": "12.0.1",
30
- "remark-frontmatter": "5.0.0",
31
- "remark-gfm": "4.0.1",
32
- "remark-lint": "10.0.1",
33
- "remark-preset-lint-consistent": "6.0.1",
34
- "remark-preset-lint-recommended": "7.0.1",
35
- "remark-toc": "9.0.0",
36
- "secretlint": "11.2.5",
37
- "ts-node": "10.9.2",
38
- "typedoc": "0.28.15",
39
- "typedoc-plugin-merge-modules": "7.0.0",
40
- "typedoc-theme-hierarchy": "6.0.0",
41
- "typescript": "5.9.3",
42
- "vitest": "4.0.16"
15
+ "@biomejs/biome": "catalog:",
16
+ "@commitlint/cli": "catalog:",
17
+ "@commitlint/config-conventional": "catalog:",
18
+ "@fast-check/vitest": "catalog:",
19
+ "@secretlint/secretlint-rule-preset-recommend": "catalog:",
20
+ "@stryker-mutator/core": "catalog:",
21
+ "@stryker-mutator/typescript-checker": "catalog:",
22
+ "@stryker-mutator/vitest-runner": "catalog:",
23
+ "@types/node": "catalog:",
24
+ "@vitest/coverage-v8": "catalog:",
25
+ "dependency-cruiser": "catalog:",
26
+ "fast-check": "catalog:",
27
+ "lefthook": "catalog:",
28
+ "remark": "catalog:",
29
+ "remark-cli": "catalog:",
30
+ "remark-frontmatter": "catalog:",
31
+ "remark-gfm": "catalog:",
32
+ "remark-lint": "catalog:",
33
+ "remark-preset-lint-consistent": "catalog:",
34
+ "remark-preset-lint-recommended": "catalog:",
35
+ "remark-toc": "catalog:",
36
+ "secretlint": "catalog:",
37
+ "ts-node": "catalog:",
38
+ "typedoc": "catalog:",
39
+ "typedoc-plugin-merge-modules": "catalog:",
40
+ "typedoc-theme-hierarchy": "catalog:",
41
+ "typescript": "catalog:",
42
+ "vitest": "catalog:"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=22.0.0"
@@ -70,6 +70,7 @@
70
70
  "license": "MIT",
71
71
  "main": "./dist/index.js",
72
72
  "name": "@semba-ryuichiro/webpify",
73
+ "packageManager": "pnpm@10.26.2",
73
74
  "publishConfig": {
74
75
  "access": "public",
75
76
  "registry": "https://registry.npmjs.org/"
@@ -78,9 +79,6 @@
78
79
  "type": "git",
79
80
  "url": "git+https://github.com/semba-yui/webpify.git"
80
81
  },
81
- "type": "module",
82
- "types": "./dist/index.d.ts",
83
- "version": "1.0.4",
84
82
  "scripts": {
85
83
  "build": "tsc",
86
84
  "deps": "dependency-cruiser src --config .dependency-cruiser.cjs",
@@ -88,15 +86,23 @@
88
86
  "dev": "tsc --watch",
89
87
  "docs:gen": "typedoc",
90
88
  "lint": "biome check .",
89
+ "lint:actions": "actionlint",
91
90
  "lint:fix": "biome check --write .",
91
+ "lint:gha": "ghalint run",
92
92
  "lint:md": "remark . --quiet",
93
93
  "lint:md:fix": "remark . --quiet --output",
94
94
  "lint:secret": "secretlint \"**/*\"",
95
+ "lint:yaml": "yamllint .",
96
+ "lint:zizmor": "zizmor .github/workflows/",
97
+ "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run build",
95
98
  "test": "vitest run",
96
99
  "test:coverage": "vitest run --coverage",
97
100
  "test:mutation": "stryker run",
98
101
  "test:mutation:dry": "stryker run --dryRunOnly",
99
102
  "test:watch": "vitest",
100
103
  "typecheck": "tsc --noEmit"
101
- }
102
- }
104
+ },
105
+ "type": "module",
106
+ "types": "./dist/index.d.ts",
107
+ "version": "1.0.7"
108
+ }