create-caspian-share
v0.1.0
Published
One-command scaffolder for @caspian-explorer/script-caspian-share. Enables `npm create caspian-share@latest <project-dir>`.
Maintainers
Readme
create-caspian-share
One-command scaffolder for @caspian-explorer/script-caspian-share.
Usage
npm create caspian-share@latest my-share-appInteractive prompts let you pick the hosting target (Vercel / Firebase / both), brand color, locale, and whether to scaffold the Cloud Function + Firestore rules.
Non-interactive
npm create caspian-share@latest my-share-app -- --yes --hosting=vercelWhat it generates
A fresh Next.js 14 App Router project pre-wired to <CaspianShareProvider>:
app/layout.tsx+app/_components/share-adapter.tsx(next/link + next/image + next/navigation adapters)- Sample home page using
<ShareBar>and<ShareMenu> app/api/og/route.tsx(Vercel@vercel/oghandler) when Vercel target is enabledapp/s/[slug]/route.ts(short-link resolver) when Vercel + Firebase both enabledfirebase.jsonwith hosting rewrites + Firestore rules + functions config when Firebase target is enabledfirestore.rules+firestore.indexes.jsonfor share counts, short links, OG cache, event logfunctions/directory ready forcaspianShareRecordEvents,caspianShareCreateShortLink,caspianShareResolveShortLink,caspianShareFetchOgMetadata, andcaspianShareDailyRollup
How it works
Clones Caspian-Explorer/script-caspian-share on main (shallow), runs the in-tree scaffolder against your chosen directory, then deletes the clone. You always get the latest scaffolder, rules, and Cloud Function source on every invocation.
License
MIT
