@playcraft/cli 0.0.4 → 0.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
@@ -97,7 +97,7 @@ npx @playcraft/cli build --platform facebook --format html --output ./dist
97
97
 
98
98
  | 平台 | 格式 | 大小限制 | SDK/API |
99
99
  |------|------|----------|---------|
100
- | **Facebook** | HTML | 2MB | FbPlayableAd |
100
+ | **Facebook** | HTML/ZIP | HTML: 5MB / ZIP: 5MB(HTML < 2MB | FbPlayableAd |
101
101
  | **Snapchat** | ZIP | 5MB | MRAID 2.0 |
102
102
  | **ironSource** | HTML | 5MB | MRAID + dapi |
103
103
  | **AppLovin** | HTML | 5MB | MRAID 2.0 |
@@ -201,11 +201,16 @@ export async function buildCommand(projectPath, options) {
201
201
  {
202
202
  type: 'list',
203
203
  name: 'format',
204
- message: '选择输出格式:',
205
- choices: [
206
- { name: 'HTML(单文件)', value: 'html' },
207
- { name: 'ZIP(多文件)', value: 'zip' },
208
- ],
204
+ message: (answers) => answers.platform === 'facebook' ? '选择输出格式(Facebook 支持两种格式):' : '选择输出格式:',
205
+ choices: (answers) => answers.platform === 'facebook'
206
+ ? [
207
+ { name: 'HTML(单文件,最大 5MB,所有资源内联)', value: 'html' },
208
+ { name: 'ZIP(多文件,最大 5MB,HTML 文件需 < 2MB)', value: 'zip' },
209
+ ]
210
+ : [
211
+ { name: 'HTML(单文件)', value: 'html' },
212
+ { name: 'ZIP(多文件)', value: 'zip' },
213
+ ],
209
214
  default: 'html',
210
215
  },
211
216
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "dev": "tsc -w",
16
16
  "build": "tsc",
17
17
  "start": "node dist/index.js",
18
- "publish": "npm version patch --no-git-tag && pnpm build && npm publish --access public"
18
+ "release": "npm version patch --no-git-tag && pnpm build && npm publish --access public"
19
19
  },
20
20
  "dependencies": {
21
21
  "@playcraft/build": "workspace:*",