Rename to storebound (plugin, CLI, config file, credentials folder, repo)

This commit is contained in:
CRTkafa 2026-10-10 12:35:26 +00:00
parent ecb3dc3dc3
commit 0ca1d464e4
52 changed files with 171 additions and 171 deletions

View file

@ -1,5 +1,5 @@
// App-level App Store settings (idempotent), from apple.info in crt-ship.config.ts:
// crt-ship apple appinfo [--dry]
// App-level App Store settings (idempotent), from apple.info in storebound.config.ts:
// storebound apple appinfo [--dry]
// - categories (primary + up to two game subcategories, secondary)
// - age rating declaration: every content question NONE / false unless overridden in apple.info.ageRating
// - content rights declaration

View file

@ -1,5 +1,5 @@
// Register the bundle id (Certificates, Identifiers & Profiles) through the API. Idempotent.
// crt-ship apple bundle [--name "My Game"] [--dry]
// storebound apple bundle [--name "My Game"] [--dry]
// The App Store Connect app record itself can NOT be created through the API: do that in the web UI afterwards
// (Apps > + > New App, pick this bundle id), see the appstore-first-release skill.
import type { Ctx } from '../lib/ctx';

View file

@ -1,6 +1,6 @@
// Upload the App Review screenshot of every in-app purchase (idempotent: a screenshot whose MD5 matches is kept) and
// print each product's state. Nothing is submitted.
// crt-ship apple iap-review [--dry]
// storebound apple iap-review [--dry]
// Screenshot per product: products[].reviewScreenshot, else apple.reviewShots/<product id>.(png|jpg).
// Size: a real device screenshot size (e.g. 1290 x 2796); other sizes fail with IMAGE_INCORRECT_DIMENSIONS.
import { existsSync, readFileSync } from 'node:fs';

View file

@ -1,7 +1,7 @@
// In-app purchases on App Store Connect: create missing products, localizations, price schedule (USA base + your
// overrides; Apple equalizes every other storefront) and availability (every territory + new ones). Idempotent:
// existing products and schedules are left alone (prices of an existing schedule are not changed; do that in the UI).
// crt-ship apple iap [--dry] [--only id1,id2]
// storebound apple iap [--dry] [--only id1,id2]
// Then `apple iap-review` for the review screenshots. First IAPs can only be submitted together with an app version,
// from the IAP page in the web UI (see the store-iap-setup skill).
import type { Ctx } from '../lib/ctx';

View file

@ -1,5 +1,5 @@
// App Store version + listing text (idempotent; re-run after editing the App Store listing file).
// crt-ship apple listing --version 1.0.0 [--build 3] [--dry]
// storebound apple listing --version 1.0.0 [--build 3] [--dry]
// - the editable iOS version: versionString, copyright, release type MANUAL; with --build that processed build is attached
// - appInfoLocalizations: name, subtitle, privacy policy URL per locale
// - appStoreVersionLocalizations: description, keywords, promotional text, what's new (not on a first version),

View file

@ -1,8 +1,8 @@
// App Review information on the editable version: contact, demo account (none), notes. Idempotent.
// crt-ship apple review-details [--contact-from <Apple ID of another app>] [--dry]
// storebound apple review-details [--contact-from <Apple ID of another app>] [--dry]
// The contact (name, phone, email) is personal data, so it is never in the config: it comes from
// .crt-ship/credentials.json "reviewContact", or is copied from another app of the same team with --contact-from.
// Notes: apple.info.reviewNotes in crt-ship.config.ts.
// .storebound/credentials.json "reviewContact", or is copied from another app of the same team with --contact-from.
// Notes: apple.info.reviewNotes in storebound.config.ts.
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { reviewContact } from '../lib/credentials';
@ -27,7 +27,7 @@ export async function run(ctx: Ctx): Promise<void> {
const rc = reviewContact(root);
if (rc) contact = { contactFirstName: rc.firstName, contactLastName: rc.lastName, contactPhone: rc.phone, contactEmail: rc.email };
}
if (!contact) throw new Error('no review contact: add "reviewContact" to .crt-ship/credentials.json or pass --contact-from <app id>');
if (!contact) throw new Error('no review contact: add "reviewContact" to .storebound/credentials.json or pass --contact-from <app id>');
const attributes = { ...contact, demoAccountRequired: false, demoAccountName: null, demoAccountPassword: null, notes: config.apple?.info?.reviewNotes ?? '' };
if (ctx.args.has('dry')) { log('apple', `would set review details (contact ${from ? 'copied from ' + from : 'from credentials'}, notes ${attributes.notes.length} chars)`); return; }

View file

@ -1,6 +1,6 @@
// Store screenshots of every locale on the editable App Store version (idempotent: a set whose files already match
// by MD5 and order is left alone, otherwise it is emptied and re-uploaded).
// crt-ship apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4]
// storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4]
// Source per language: <renders>/<language id>/ios69/NN.png (6.9", 1320 x 2868 -> APP_IPHONE_67) and
// ios65/NN.png (6.5", 1284 x 2778 -> APP_IPHONE_65). Up to 10 per set. Apple processes uploads asynchronously; failed
// ones are reported at the end. Long: run in the background with a log file.

View file

@ -1,7 +1,7 @@
// Read-only overview: app record, versions + attached build, recent builds, in-app purchases, review submissions.
// crt-ship apple status [--json]
// storebound apple status [--json]
// And the one write it offers: cancel a review submission (to re-add first IAPs to it from the web UI):
// crt-ship apple status --cancel-submission <id> [--yes]
// storebound apple status --cancel-submission <id> [--yes]
import type { Ctx } from '../lib/ctx';
import { confirm, need } from '../lib/ctx';
import { log } from '../lib/log';

View file

@ -1,6 +1,6 @@
// Offline sanity check of everything the store commands read: config, both listing files, the screenshot copy, data
// safety answers, product texts vs store limits, and the files the config points at. No network, no credentials.
// crt-ship check
// storebound check
import { existsSync, readFileSync } from 'node:fs';
import { playCodes } from './lib/config';
import { len, parseAppStoreListing, parsePlayListing } from './lib/copy';
@ -44,8 +44,8 @@ export async function run(ctx: Ctx): Promise<void> {
const files = [config.icons?.composite, config.icons?.foreground, config.icons?.background, config.shots?.logo,
...(config.products ?? []).map(p => p.reviewScreenshot)].filter((f): f is string => !!f);
for (const f of new Set(files)) if (!existsSync(resolve(f))) problems.push(`missing file: ${f}`);
if (existsSync(resolve('.gitignore')) && !/^\/?\.crt-ship\/?$/m.test(readFileSync(resolve('.gitignore'), 'utf8')))
problems.push('.gitignore does not ignore .crt-ship/ (credentials live there)');
if (existsSync(resolve('.gitignore')) && !/^\/?\.storebound\/?$/m.test(readFileSync(resolve('.gitignore'), 'utf8')))
problems.push('.gitignore does not ignore .storebound/ (credentials live there)');
if (problems.length) { for (const p of problems) console.error(` - ${p}`); throw new Error(`${problems.length} problems`); }
log('check', 'all good');

View file

@ -1,6 +1,6 @@
// One artwork -> every icon the stores, the native shells and the web build need. Needs ffmpeg (cwebp optional).
// crt-ship icons [--dry]
// In (icons in crt-ship.config.ts): composite (1024 opaque full icon), foreground (1024 RGBA subject on transparent)
// storebound icons [--dry]
// In (icons in storebound.config.ts): composite (1024 opaque full icon), foreground (1024 RGBA subject on transparent)
// and background (1024 opaque) for the adaptive / maskable variants.
// Out:
// <out>/app-store-1024.png App Store icon, rgb24 (Apple rejects an alpha channel)
@ -50,7 +50,7 @@ export async function run(ctx: Ctx): Promise<void> {
const fg = ic.foreground ? resolve(ic.foreground) : '';
const bg = ic.background ? resolve(ic.background) : '';
const adaptiveK = ic.adaptiveScale ?? ADAPTIVE_FG;
const tmp = join(root, '.crt-ship', 'tmp-icons');
const tmp = join(root, '.storebound', 'tmp-icons');
mkdirSync(tmp, { recursive: true });
const opaque = (size: number, out: string, palette = false): void => {

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bun
// crt-ship: ship a mobile game to Google Play and the App Store from the terminal.
// Run `crt-ship help` for the command list. Config: crt-ship.config.ts; credentials: env or .crt-ship/.
// storebound: ship a mobile game to Google Play and the App Store from the terminal.
// Run `storebound help` for the command list. Config: storebound.config.ts; credentials: env or .storebound/.
import { parseArgs } from './lib/args';
import { loadConfig } from './lib/config';
import type { Ctx } from './lib/ctx';
@ -30,15 +30,15 @@ const COMMANDS: Record<string, [() => Promise<Mod>, string]> = {
};
function help(): void {
console.log(`crt-ship · ship mobile games to Google Play and the App Store
console.log(`storebound · ship mobile games to Google Play and the App Store
usage: crt-ship <command> [options]
usage: storebound <command> [options]
init copy the templates (config, listing, copy, privacy policy) into this project
${Object.entries(COMMANDS).map(([k, [, d]]) => ` ${k.padEnd(25)} ${d}`).join('\n')}
common options: --config <path> --dry (no writes) --only <ids> --yes (skip confirmations)
credentials: PLAY_SERVICE_ACCOUNT, ASC_KEY_ID, ASC_ISSUER_ID, ASC_P8 (env or .crt-ship/credentials.json)
credentials: PLAY_SERVICE_ACCOUNT, ASC_KEY_ID, ASC_ISSUER_ID, ASC_P8 (env or .storebound/credentials.json)
docs: README.md and the skills/ folder of the toolchain`);
}

View file

@ -1,5 +1,5 @@
// Copies the templates into the current project without overwriting anything, and makes sure .crt-ship/ is ignored.
// crt-ship init [--dir .]
// Copies the templates into the current project without overwriting anything, and makes sure .storebound/ is ignored.
// storebound init [--dir .]
import { appendFileSync, copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
import type { Args } from './lib/args';
@ -7,14 +7,14 @@ import { log } from './lib/log';
const T = join(import.meta.dir, '..', 'templates');
const FILES: [string, string][] = [
['crt-ship.config.ts', 'crt-ship.config.ts'],
['storebound.config.ts', 'storebound.config.ts'],
['listing.md', 'store/listing.md'],
['appstore.md', 'store/appstore.md'],
['shots-copy.json', 'store/shots/copy.json'],
['app-privacy.md', 'store/app-privacy.md'],
['declarations.md', 'store/declarations.md'],
['privacy-policy.html', 'store/privacy-policy.html'],
['credentials.example.json', '.crt-ship/credentials.json'],
['credentials.example.json', '.storebound/credentials.json'],
];
export async function run(args: Args): Promise<void> {
@ -28,10 +28,10 @@ export async function run(args: Args): Promise<void> {
}
const gi = join(root, '.gitignore');
const cur = existsSync(gi) ? readFileSync(gi, 'utf8') : '';
if (!/^\/?\.crt-ship\/?$/m.test(cur)) {
if (cur) appendFileSync(gi, `${cur.endsWith('\n') ? '' : '\n'}# crt-ship: credentials, fonts, temp files\n.crt-ship/\n`);
else writeFileSync(gi, '# crt-ship: credentials, fonts, temp files\n.crt-ship/\n');
log('init', '.gitignore: added .crt-ship/');
if (!/^\/?\.storebound\/?$/m.test(cur)) {
if (cur) appendFileSync(gi, `${cur.endsWith('\n') ? '' : '\n'}# storebound: credentials, fonts, temp files\n.storebound/\n`);
else writeFileSync(gi, '# storebound: credentials, fonts, temp files\n.storebound/\n');
log('init', '.gitignore: added .storebound/');
}
log('init', 'next: edit crt-ship.config.ts and .crt-ship/credentials.json, then `crt-ship check`');
log('init', 'next: edit storebound.config.ts and .storebound/credentials.json, then `storebound check`');
}

View file

@ -1,4 +1,4 @@
// Per-project config (crt-ship.config.ts at the project root). Everything game-specific lives here; credentials never
// Per-project config (storebound.config.ts at the project root). Everything game-specific lives here; credentials never
// do (see credentials.ts). The file default-exports a plain object; `import type { ShipConfig }` is optional.
import { existsSync } from 'node:fs';
import { dirname, isAbsolute, join, resolve } from 'node:path';
@ -227,9 +227,9 @@ export function validateConfig(c: unknown): string[] {
export interface Loaded { config: ShipConfig; root: string; path: string; resolve(p: string): string }
const NAMES = ['crt-ship.config.ts', 'crt-ship.config.js', 'crt-ship.config.json'];
const NAMES = ['storebound.config.ts', 'storebound.config.js', 'storebound.config.json'];
/** Finds crt-ship.config.* from `start` upwards (or uses `explicit`), imports and validates it. */
/** Finds storebound.config.* from `start` upwards (or uses `explicit`), imports and validates it. */
export async function loadConfig(explicit?: string, start = process.cwd()): Promise<Loaded> {
let path = explicit ? resolve(explicit) : '';
if (!path) {
@ -239,7 +239,7 @@ export async function loadConfig(explicit?: string, start = process.cwd()): Prom
if (dirname(d) === d) break;
}
}
if (!path || !existsSync(path)) throw new Error('no crt-ship.config.ts found (run `crt-ship init` or pass --config)');
if (!path || !existsSync(path)) throw new Error('no storebound.config.ts found (run `storebound init` or pass --config)');
const mod = await import(path);
const config = (mod.default ?? mod) as ShipConfig;
const errors = validateConfig(config);

View file

@ -1,7 +1,7 @@
// Credentials never live in crt-ship.config.ts or in git. Sources, first hit wins:
// Credentials never live in storebound.config.ts or in git. Sources, first hit wins:
// 1. environment: PLAY_SERVICE_ACCOUNT (path to the JSON key, or the JSON itself), ASC_KEY_ID, ASC_ISSUER_ID,
// ASC_P8 (path to AuthKey_<id>.p8, or the PEM itself)
// 2. <project>/.crt-ship/credentials.json (gitignored), same names:
// 2. <project>/.storebound/credentials.json (gitignored), same names:
// { "PLAY_SERVICE_ACCOUNT": "...", "ASC_KEY_ID": "...", "ASC_ISSUER_ID": "...", "ASC_P8": "...",
// "reviewContact": { "firstName": "", "lastName": "", "phone": "", "email": "" } }
// 3. ASC_P8 only: ~/.appstoreconnect/private_keys/AuthKey_<ASC_KEY_ID>.p8 (where Xcode / altool keep it)
@ -16,7 +16,7 @@ export interface ReviewContact { firstName: string; lastName: string; phone: str
type Store = Record<string, unknown>;
function fileStore(root: string): Store {
const p = join(root, '.crt-ship', 'credentials.json');
const p = join(root, '.storebound', 'credentials.json');
if (!existsSync(p)) return {};
try { return JSON.parse(readFileSync(p, 'utf8')) as Store; } catch (e) { throw new Error(`${p}: ${(e as Error).message}`); }
}
@ -40,20 +40,20 @@ export function parseServiceAccount(text: string): ServiceAccount {
export function playServiceAccount(root: string): ServiceAccount {
const v = value(root, 'PLAY_SERVICE_ACCOUNT');
if (!v) throw new Error('PLAY_SERVICE_ACCOUNT is not set (env, or .crt-ship/credentials.json): path to the service account JSON key');
if (!v) throw new Error('PLAY_SERVICE_ACCOUNT is not set (env, or .storebound/credentials.json): path to the service account JSON key');
return parseServiceAccount(inline(v, /^\s*\{/));
}
export function ascKey(root: string): AscKey {
const keyId = value(root, 'ASC_KEY_ID');
const issuerId = value(root, 'ASC_ISSUER_ID');
if (!keyId || !issuerId) throw new Error('ASC_KEY_ID and ASC_ISSUER_ID are not set (env, or .crt-ship/credentials.json)');
if (!keyId || !issuerId) throw new Error('ASC_KEY_ID and ASC_ISSUER_ID are not set (env, or .storebound/credentials.json)');
const p8 = value(root, 'ASC_P8') ?? join(homedir(), '.appstoreconnect/private_keys', `AuthKey_${keyId}.p8`);
if (!/BEGIN PRIVATE KEY/.test(p8) && !existsSync(p8.replace(/^~(?=\/)/, homedir()))) throw new Error(`App Store Connect key not found: ${p8} (set ASC_P8)`);
return { keyId, issuerId, pem: inline(p8, /BEGIN PRIVATE KEY/) };
}
/** App Review contact from .crt-ship/credentials.json (personal data, so never in the config). */
/** App Review contact from .storebound/credentials.json (personal data, so never in the config). */
export function reviewContact(root: string): ReviewContact | null {
const c = fileStore(root).reviewContact as Partial<ReviewContact> | undefined;
if (!c?.email) return null;

View file

@ -5,7 +5,7 @@ import { playCodes } from './config';
export interface Ctx { loaded: Loaded; args: Args }
export function need<T>(v: T | undefined, what: string): T {
if (v === undefined || v === null) throw new Error(`crt-ship.config.ts: ${what} is not set`);
if (v === undefined || v === null) throw new Error(`storebound.config.ts: ${what} is not set`);
return v;
}

View file

@ -1,5 +1,5 @@
// Plain, line-based progress output: easy to follow live and easy to tail when a long upload runs in the background
// (`crt-ship play images > .crt-ship/images.log 2>&1 &`). Every line carries a timestamp and a tag.
// (`storebound play images > .storebound/images.log 2>&1 &`). Every line carries a timestamp and a tag.
const t0 = Date.now();
const stamp = (): string => new Date().toISOString().slice(11, 19);
const since = (): string => `${((Date.now() - t0) / 1000).toFixed(0)}s`;

View file

@ -1,6 +1,6 @@
// Play Data safety form through applications.dataSafety (CSV import; replaces every earlier answer).
// crt-ship play data-safety [--csv out.csv] [--dry]
// Answers come from `dataSafety` in crt-ship.config.ts. --dry only writes / prints the CSV.
// storebound play data-safety [--csv out.csv] [--dry]
// Answers come from `dataSafety` in storebound.config.ts. --dry only writes / prints the CSV.
import { writeFileSync } from 'node:fs';
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';

View file

@ -1,9 +1,9 @@
// Play store graphics per language, one edit per language (a Console save in parallel then only costs a retry of that
// language, not of the whole upload).
// crt-ship play images [--dry] [--only en-US,de-DE] [--src store/renders]
// storebound play images [--dry] [--only en-US,de-DE] [--src store/renders]
// Per Play language, from <renders>/<language id>/: icon (play.icon, 512x512), featureGraphic (feature/1024x500.*),
// phoneScreenshots (play/NN.*), sevenInchScreenshots (tab7/NN.*), tenInchScreenshots (tab10/NN.*). A .jpg next to a
// .png wins (JPEG q92 uploads about 4x faster; `crt-ship shots jpeg` makes them). Each image type is cleared
// .png wins (JPEG q92 uploads about 4x faster; `storebound shots jpeg` makes them). Each image type is cleared
// before uploading, so re-runs are idempotent. Uploads are slow: run in the background with a log file.
import { existsSync, readdirSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
@ -45,7 +45,7 @@ export async function run(ctx: Ctx): Promise<void> {
const set: [string, string[]][] = [['icon', [icon]], ['featureGraphic', feature ? [feature] : []],
...Object.entries(PLAY_IMAGE_DIRS).map(([type, sub]) => [type, numberedImages(join(dir, sub)).slice(0, 8)] as [string, string[]])];
for (const [type, files] of set) {
if (!files.length || !files.every(existsSync)) throw new Error(`${code}: no ${type} in ${dir} (render first: crt-ship shots render)`);
if (!files.length || !files.every(existsSync)) throw new Error(`${code}: no ${type} in ${dir} (render first: storebound shots render)`);
if (type.endsWith('Screenshots') && files.length < 2) throw new Error(`${code}: ${type} needs at least 2 images`);
}
sets.set(code, set);

View file

@ -1,5 +1,5 @@
// Play store listing text + app details in one edit.
// crt-ship play listing [--dry] [--only en-US,de-DE]
// storebound play listing [--dry] [--only en-US,de-DE]
// App details: default language, contact email, website (must be the domain that serves app-ads.txt).
// Listings: title, short and full description of every `<!-- play: ... -->` section of the listing file.
import { readFileSync } from 'node:fs';

View file

@ -1,6 +1,6 @@
// In-app products on Google Play through monetization.onetimeproducts (the legacy inappproducts API answers 403
// "Please migrate to the new publishing API" for apps on the new model).
// crt-ship play products [--dry] [--only id1,id2]
// storebound play products [--dry] [--only id1,id2]
// Per product: convertRegionPrices (USD base -> every region at local price points, plus regionsVersion), your
// explicit overrides on top, PATCH ...?allowMissing=true (create or update), then activate the purchase option
// (new options start as DRAFT) with purchaseOptions:batchUpdateStates. Idempotent.

View file

@ -1,7 +1,7 @@
// Upload an AAB (or reuse an uploaded versionCode) and put it on one or more tracks in one edit, with the "What's new"
// of every listing language as release notes.
// crt-ship play release app-release.aab [--internal completed] [--production draft] [--name "1.0.0 (3)"] [--dry]
// crt-ship play release --version-code 3 --production draft
// storebound play release app-release.aab [--internal completed] [--production draft] [--name "1.0.0 (3)"] [--dry]
// storebound play release --version-code 3 --production draft
// Tracks: internal, alpha (closed), beta (open), production; status completed | draft | inProgress | halted.
// Without a track flag: internal, completed. A production release that is not a draft asks for confirmation.
// Draft app (never published): Play only accepts status "draft" on any track; the first production release is sent

View file

@ -1,5 +1,5 @@
// Read-only overview: tracks and releases, listing languages, one-time products and their purchase option states.
// crt-ship play status [--json]
// storebound play status [--json]
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { playClient } from './client';

View file

@ -1,4 +1,4 @@
// Playwright is not a dependency of crt-ship: it is resolved from the project (or the crt-ship folder), so a project
// Playwright is not a dependency of storebound: it is resolved from the project (or the storebound folder), so a project
// that never renders screenshots never downloads a browser. Launch order: Playwright's own Chromium, then an installed
// Google Chrome (channel "chrome"), so `bunx playwright install chromium` is optional when Chrome is there.
import { join } from 'node:path';

View file

@ -1,5 +1,5 @@
// Raw frames from a running build of your game (headless Chromium, mobile viewport, touch, device scale).
// crt-ship shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet]
// storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet]
// Each entry of shots.capture.shots: { path, waitFor?: JS expression that turns true, eval?: [JS], delayMs?, device? }.
// URL = baseUrl + path + (? or &) + query, with "{lang}" replaced. Frames go to <shots.frames>/<lang>/<device>/<name>.png.
// The frame is the screen BELOW the status bar (the template draws one), so the viewport is phone.w x phone.h.

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<link rel="stylesheet" href="/fonts/fonts.css">
<!-- Play feature graphic, 1024 x 500: logo (or the app name) on the left, a tilted phone with one frame on the right.
feature.html?lang=<id>. Rendered by `crt-ship shots render`. Keep text out of it: Play overlays its own UI. -->
feature.html?lang=<id>. Rendered by `storebound shots render`. Keep text out of it: Play overlays its own UI. -->
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 1024px; height: 500px; overflow: hidden; background: #000; }

View file

@ -1,8 +1,8 @@
// Downloads the fonts the screenshot template needs, subset by Google Fonts (css2 `text=`) to exactly the characters
// your copy uses, so even CJK stays small: title + body family for Latin text, plus one Noto family per non-Latin
// script found in the copy (CJK, Arabic, Hebrew, Devanagari, Thai, Cyrillic / Greek).
// crt-ship shots fonts (re-run after editing the copy)
// Out: <project>/.crt-ship/fonts/*.woff2 + fonts.css. All of these fonts are SIL Open Font License 1.1.
// storebound shots fonts (re-run after editing the copy)
// Out: <project>/.storebound/fonts/*.woff2 + fonts.css. All of these fonts are SIL Open Font License 1.1.
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import type { Ctx } from '../lib/ctx';
@ -28,7 +28,7 @@ export async function run(ctx: Ctx): Promise<void> {
const { config, root, resolve } = ctx.loaded;
const shots = need(config.shots, 'shots');
const copy = JSON.parse(readFileSync(resolve(shots.copy), 'utf8')) as CopyFile;
const dir = join(root, '.crt-ship', 'fonts');
const dir = join(root, '.storebound', 'fonts');
mkdirSync(dir, { recursive: true });
const title = shots.fonts?.title ?? 'Lilita One', body = shots.fonts?.body ?? 'Montserrat';
@ -45,7 +45,7 @@ export async function run(ctx: Ctx): Promise<void> {
for (const ch of config.app.name) latin.add(ch);
const latinChars = [...latin].sort().join('');
let css = '/* Generated by crt-ship shots fonts (Google Fonts, SIL Open Font License 1.1), subset to the copy. */\n';
let css = '/* Generated by storebound shots fonts (Google Fonts, SIL Open Font License 1.1), subset to the copy. */\n';
const jobs: [string, string, string, boolean][] = [[title, 'title', latinChars, false], [body, 'body', latinChars, true],
...[...scripts.entries()].map(([slug, s]) => [s.family, slug, [...s.chars].sort().join(''), true] as [string, string, string, boolean])];
for (const [family, slug, chars, variable] of jobs) {

View file

@ -1,6 +1,6 @@
// JPEG copies of the Play renders (play, tab7, tab10, feature): about 4x smaller, so `play images` uploads much faster.
// The App Store screenshots stay PNG.
// crt-ship shots jpeg [--q 92] [--lang en,tr]
// storebound shots jpeg [--q 92] [--lang en,tr]
import { existsSync, readdirSync } from 'node:fs';
import { join } from 'node:path';
import { spawnSync } from 'node:child_process';

View file

@ -1,5 +1,5 @@
// Store screenshots + Play feature graphic at exact pixel sizes, from raw game frames and per-language copy.
// crt-ship shots render [--lang en,tr] [--size ios69,play,feature] [--scenes 1,3] [--no-sheet] [--port 8792]
// storebound shots render [--lang en,tr] [--size ios69,play,feature] [--scenes 1,3] [--no-sheet] [--port 8792]
// Out: <shots.out>/<lang>/<size>/NN.png (24-bit RGB: Play rejects alpha / palette PNGs), <lang>/feature/1024x500.png,
// and <lang>/sheet.png (contact sheet of every size, for a quick review). Needs playwright + ffmpeg.
import { existsSync, mkdirSync, readFileSync, rmSync } from 'node:fs';
@ -26,8 +26,8 @@ export async function run(ctx: Ctx): Promise<void> {
const problems = validateCopy(copy, shots, langs);
if (problems.length) throw new Error('shots copy:\n ' + problems.join('\n '));
const framesDir = resolve(shots.frames), outDir = resolve(shots.out);
const fontsDir = join(root, '.crt-ship', 'fonts');
if (!existsSync(join(fontsDir, 'fonts.css'))) warn('shots', 'no .crt-ship/fonts/fonts.css: run `crt-ship shots fonts` first (falling back to system fonts)');
const fontsDir = join(root, '.storebound', 'fonts');
if (!existsSync(join(fontsDir, 'fonts.css'))) warn('shots', 'no .storebound/fonts/fonts.css: run `storebound shots fonts` first (falling back to system fonts)');
const phone = { ...DEFAULT_PHONE, ...shots.phone }, tablet = { ...DEFAULT_TABLET, ...shots.tablet };
const rtl = new Map(config.languages.map(l => [l.id, !!l.rtl] as const));
const fonts = { title: shots.fonts?.title ?? 'Lilita One', body: shots.fonts?.body ?? 'Montserrat' };

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<link rel="stylesheet" href="/fonts/fonts.css">
<!--
Store screenshot template (rendered by `crt-ship shots render`, served by its local server).
Store screenshot template (rendered by `storebound shots render`, served by its local server).
template.html?s=<scene id>&w=<px>&h=<px>&lang=<id>[&device=tablet]
/job.json gives the scene (palette, frames, badge slots), the words for this language and the font families.
Layout: everything is in u = W / 100; the text block is measured first, then the phone fills the room below it.