@nano191225/scriptup 1.0.0 → 1.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nano191225
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ja.md ADDED
@@ -0,0 +1,182 @@
1
+ [English](README.md) | 日本語
2
+
3
+ # scriptup
4
+
5
+ [![Release](https://img.shields.io/github/v/release/Nano191225/scriptup?display_name=tag)](https://github.com/Nano191225/scriptup/releases)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
8
+
9
+ Minecraft Bedrock ScriptAPI 開発向けの CLI です。
10
+
11
+ scriptup は、@minecraft/\* の更新、ScriptAPI での外部ライブラリ利用、そして ScriptAPI 用ライブラリ作成の初期構築を素早く行えるようにします。
12
+
13
+ ## モチベーション
14
+
15
+ - @minecraft/\* の更新を容易にする
16
+ - ScriptAPI で簡単に外部ライブラリを使えるようにする
17
+ - ScriptAPI 用のライブラリを簡単に作れるようにする
18
+
19
+ ## 主な機能
20
+
21
+ - manifest.json の ScriptAPI 依存バージョン更新と、対応 npm パッケージのインストール
22
+ - development_behavior_packs 直下への新規プロジェクト作成
23
+ - 現在のディレクトリを ScriptAPI プロジェクトとして初期化
24
+ - manifest.json の script entry を出力先として tsdown ビルド
25
+ - 再利用可能ライブラリ作成向けのローカル雛形生成
26
+
27
+ ## 動作要件
28
+
29
+ - Node.js 18 以上
30
+ - アドオンを試すための Minecraft Bedrock 実行環境
31
+ - npm, pnpm, yarn, bun のいずれか
32
+
33
+ ## インストール
34
+
35
+ 好みのパッケージマネージャーで global インストールしてください。
36
+
37
+ ```bash
38
+ npm i -g @nano191225/scriptup
39
+ ```
40
+
41
+ ```bash
42
+ pnpm add -g @nano191225/scriptup
43
+ ```
44
+
45
+ 導入後は scriptup(または sup)で実行できます。
46
+
47
+ ## クイックスタート
48
+
49
+ ### 最新 stable の ScriptAPI モジュールへ更新
50
+
51
+ ```bash
52
+ scriptup stable
53
+ ```
54
+
55
+ ### 新規プロジェクト作成
56
+
57
+ ```bash
58
+ scriptup new my-pack --open
59
+ ```
60
+
61
+ ### ビルド
62
+
63
+ ```bash
64
+ scriptup build
65
+ ```
66
+
67
+ ## コマンド
68
+
69
+ ### scriptup stable
70
+
71
+ 最新の stable な Minecraft バージョンに一致するモジュールをインストールします。
72
+
73
+ ### scriptup preview
74
+
75
+ 最新の preview な Minecraft バージョンに一致するモジュールをインストールします。
76
+
77
+ ### scriptup lts
78
+
79
+ LTS 相当(stable/preview/beta/internal 以外を優先)のモジュールをインストールします。見つからない場合は stable 相当にフォールバックします。
80
+
81
+ ### scriptup <version>
82
+
83
+ 手動バージョン検索モードです。
84
+
85
+ 例:
86
+
87
+ ```bash
88
+ scriptup 1.21.60
89
+ scriptup 2.0.0-beta
90
+ ```
91
+
92
+ ### scriptup init
93
+
94
+ 現在のディレクトリを ScriptAPI プロジェクトとして初期化します。
95
+
96
+ オプション:
97
+
98
+ - --no-workflow: GitHub Actions workflow を生成しない
99
+
100
+ 実行内容:
101
+
102
+ - 主要ファイルを生成(manifest.json, tsconfig.json, src/main.ts など)
103
+ - tsdown.config.ts がなければ作成
104
+ - package.json scripts を更新
105
+ - build: scriptup build --release
106
+ - watch: scriptup build --watch
107
+ - 必要な devDependencies をインストール
108
+
109
+ ### scriptup new <project-name>
110
+
111
+ 新しい ScriptAPI プロジェクトを作成します。
112
+
113
+ オプション:
114
+
115
+ - -o, --open [command]: 作成後にエディタで開く(既定値: code)
116
+ - -p, --preview: Minecraft Bedrock Preview の behavior packs ディレクトリを使う
117
+ - -d, --dir <path>: 指定ディレクトリ配下に作成
118
+ - --lib: package/ 配下にローカルライブラリ雛形を含める
119
+ - --no-link: --dir 使用時の behavior packs へのリンク作成を無効化
120
+ - --no-workflow: GitHub Actions workflow を生成しない
121
+
122
+ 既定の作成先:
123
+
124
+ - Windows stable:
125
+ - %APPDATA%/Minecraft Bedrock/Users/Shared/games/com.mojang/development_behavior_packs
126
+ - Windows preview:
127
+ - %APPDATA%/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_behavior_packs
128
+ - Linux (mcpelauncher):
129
+ - ${XDG_DATA_HOME:-~/.local/share}/mcpelauncher/games/com.mojang/development_behavior_packs
130
+
131
+ ### scriptup build
132
+
133
+ tsdown で現在の ScriptAPI プロジェクトをビルドします。
134
+
135
+ オプション:
136
+
137
+ - -b, --bundle: 強制的にバンドル出力
138
+ - -w, --watch: 監視モード
139
+ - -r, --release: リリースビルド(圧縮有効、sourcemap 無効)
140
+
141
+ ビルド挙動の要点:
142
+
143
+ - 出力先は manifest.json の script module entry から決定(例: scripts/main.js)
144
+ - 入力エントリの優先順位
145
+ - src/main.ts
146
+ - src/index.ts
147
+ - tsdown.config.ts の entry
148
+ - release モードでは package/ が存在する場合に package/\*\*/\*.ts も dist/ へ追加ビルド
149
+
150
+ ## 典型的な使い方
151
+
152
+ ### 既存プロジェクト
153
+
154
+ ```bash
155
+ scriptup init
156
+ scriptup stable
157
+ scriptup build
158
+ ```
159
+
160
+ ### 新規アドオン
161
+
162
+ ```bash
163
+ scriptup new my-addon --open
164
+ cd my-addon
165
+ scriptup build --watch
166
+ ```
167
+
168
+ ### ライブラリ前提の新規プロジェクト
169
+
170
+ ```bash
171
+ scriptup new @yourname/your-lib --lib --dir . --open
172
+ ```
173
+
174
+ ## 補足
175
+
176
+ - manifest.json の依存更新と devDependencies のインストールをあわせて実行します
177
+ - packageManager フィールドまたは lockfile からパッケージマネージャーを自動判定します
178
+ - エイリアスとして sup も使えます
179
+
180
+ ## ライセンス
181
+
182
+ MIT
package/README.md ADDED
@@ -0,0 +1,182 @@
1
+ English | [日本語](README.ja.md)
2
+
3
+ # scriptup
4
+
5
+ [![Release](https://img.shields.io/github/v/release/Nano191225/scriptup?display_name=tag)](https://github.com/Nano191225/scriptup/releases)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
8
+
9
+ CLI for Minecraft Bedrock ScriptAPI development.
10
+
11
+ scriptup helps you keep @minecraft/\* modules current, use external libraries in ScriptAPI projects, and scaffold projects and library-ready structures quickly.
12
+
13
+ ## Motivation
14
+
15
+ - Make updating @minecraft/\* easier
16
+ - Make it easy to use external libraries in ScriptAPI
17
+ - Make it easy to create libraries for ScriptAPI
18
+
19
+ ## Features
20
+
21
+ - Update ScriptAPI module versions in manifest.json and install matching package versions
22
+ - Create a new ScriptAPI project directly in development_behavior_packs
23
+ - Initialize the current directory as a ScriptAPI project
24
+ - Build ScriptAPI code with tsdown using manifest.json script entry output
25
+ - Optional local library scaffold for creating reusable ScriptAPI packages
26
+
27
+ ## Requirements
28
+
29
+ - Node.js 18+
30
+ - Minecraft Bedrock environment for addon testing
31
+ - One of npm, pnpm, yarn, or bun
32
+
33
+ ## Install
34
+
35
+ Use your preferred package manager and install globally.
36
+
37
+ ```bash
38
+ npm i -g @nano191225/scriptup
39
+ ```
40
+
41
+ ```bash
42
+ pnpm add -g @nano191225/scriptup
43
+ ```
44
+
45
+ After installation, run via scriptup (or sup).
46
+
47
+ ## Quick Start
48
+
49
+ ### Update to latest stable ScriptAPI modules
50
+
51
+ ```bash
52
+ scriptup stable
53
+ ```
54
+
55
+ ### Create a new project
56
+
57
+ ```bash
58
+ scriptup new my-pack --open
59
+ ```
60
+
61
+ ### Build your project
62
+
63
+ ```bash
64
+ scriptup build
65
+ ```
66
+
67
+ ## Commands
68
+
69
+ ### scriptup stable
70
+
71
+ Installs module versions matching the latest stable Minecraft version.
72
+
73
+ ### scriptup preview
74
+
75
+ Installs module versions matching the latest preview Minecraft version.
76
+
77
+ ### scriptup lts
78
+
79
+ Installs LTS-like module versions (non-stable, non-preview, non-beta, non-internal when available), with fallback to stable matching versions.
80
+
81
+ ### scriptup <version>
82
+
83
+ Manual version lookup mode.
84
+
85
+ Example:
86
+
87
+ ```bash
88
+ scriptup 1.21.60
89
+ scriptup 2.0.0-beta
90
+ ```
91
+
92
+ ### scriptup init
93
+
94
+ Initialize the current directory as a ScriptAPI project.
95
+
96
+ Options:
97
+
98
+ - --no-workflow: Do not generate GitHub Actions workflow files
99
+
100
+ What it does:
101
+
102
+ - Scaffolds core project files (manifest.json, tsconfig.json, src/main.ts, etc.)
103
+ - Ensures tsdown.config.ts exists
104
+ - Sets package.json scripts:
105
+ - build: scriptup build --release
106
+ - watch: scriptup build --watch
107
+ - Installs required dev dependencies
108
+
109
+ ### scriptup new <project-name>
110
+
111
+ Create a new ScriptAPI project.
112
+
113
+ Options:
114
+
115
+ - -o, --open [command]: Open project after creation (preset: code)
116
+ - -p, --preview: Use Minecraft Bedrock Preview behavior packs directory
117
+ - -d, --dir <path>: Create under a specific directory
118
+ - --lib: Include local library scaffold under package/
119
+ - --no-link: Do not create behavior-pack link when --dir is used
120
+ - --no-workflow: Do not generate GitHub Actions workflow files
121
+
122
+ Default target directories:
123
+
124
+ - Windows stable:
125
+ - %APPDATA%/Minecraft Bedrock/Users/Shared/games/com.mojang/development_behavior_packs
126
+ - Windows preview:
127
+ - %APPDATA%/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_behavior_packs
128
+ - Linux (mcpelauncher):
129
+ - ${XDG_DATA_HOME:-~/.local/share}/mcpelauncher/games/com.mojang/development_behavior_packs
130
+
131
+ ### scriptup build
132
+
133
+ Bundle/build current ScriptAPI project using tsdown.
134
+
135
+ Options:
136
+
137
+ - -b, --bundle: Force bundled output
138
+ - -w, --watch: Watch mode
139
+ - -r, --release: Release build (minified, sourcemap off)
140
+
141
+ Build behavior summary:
142
+
143
+ - Output target is derived from manifest.json script module entry (for example scripts/main.js)
144
+ - Input entry priority:
145
+ - src/main.ts
146
+ - src/index.ts
147
+ - entry in tsdown.config.ts
148
+ - Release mode also builds package/\*\*/\*.ts into dist/ when package/ exists
149
+
150
+ ## Typical Workflows
151
+
152
+ ### Existing project
153
+
154
+ ```bash
155
+ scriptup init
156
+ scriptup stable
157
+ scriptup build
158
+ ```
159
+
160
+ ### New addon project
161
+
162
+ ```bash
163
+ scriptup new my-addon --open
164
+ cd my-addon
165
+ scriptup build --watch
166
+ ```
167
+
168
+ ### New library-ready project
169
+
170
+ ```bash
171
+ scriptup new @yourname/your-lib --lib --dir . --open
172
+ ```
173
+
174
+ ## Notes
175
+
176
+ - scriptup updates versions in manifest.json and installs matching dev dependencies
177
+ - Package manager is auto-detected from packageManager field or lockfile
178
+ - Alias command sup is also available
179
+
180
+ ## License
181
+
182
+ MIT