A CLI for scaffolding ATProto web applications

README

besaid.zone b8dbdec5 a6356213

verified
+54 -4
+20
CONTRIBUTING.md
··· 1 + # Contributing 2 + 3 + - Clone the repository 4 + - This repository uses PNPM so make sure you have that installed 5 + - Run ``pnpm install`` 6 + - Run ``pnpm dev init`` to run the CLI in dev mode 7 + 8 + ## Commit Messages 9 + 10 + Commits should follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) but it's not a hard requirement. 11 + 12 + ## Tests 13 + 14 + Not expecting 100% test coverage but if you're adding new features it would be nice to at least have some tests. 15 + 16 + ## Adding a new template 17 + 18 + New templates should go in the ``templates`` folder. See the other existing templates for an idea of what needs to be added. 19 + 20 + You'll also want to update the ``removableTemplateFiles`` function to remove files you don't need/want to remove from the template generated from the underlying vite command.
+30
README.md
··· 1 + # create-atproto-app 2 + 3 + This is a thin wrapper on top of ``create-vite`` that adds specific code for working with the AT Protocol. 4 + 5 + ## Getting Started 6 + 7 + ```bash 8 + npx create-atproto-app@latest init 9 + ``` 10 + 11 + Supported templates: 12 + 13 + - [ ] HTML + JavaScript 14 + - [x] React + TypeScript 15 + - [ ] React Router 16 + - [ ] Tanstack Router 17 + - [ ] Tanstack Start 18 + - [ ] Next.js 19 + - [x] Svelte + TypeScript 20 + - [ ] SvelteKit 21 + - [ ] Vue + TypeScript 22 + - [ ] Nuxt 23 + - [ ] Solid + TypeScript 24 + - [ ] Solid Start 25 + - [ ] Angular + TypeScript 26 + - [ ] Analog 27 + 28 + ## Contributing 29 + 30 + See [CONTRIBUTING.md](CONTRIBUTING.md) if you would like to add a feature/make a bug fix.
+2 -2
src/commands/create.ts src/commands/init.ts
··· 40 40 41 41 const cancel = () => c("operation cancelled"); 42 42 43 - export const createCommand: CommandDef = { 43 + export const initCommand: CommandDef = { 44 44 meta: { 45 - name: "create", 45 + name: "init", 46 46 description: "Create a new ATProto project", 47 47 }, 48 48 args: {
+2 -2
src/index.ts
··· 1 1 import { defineCommand, runMain } from "citty"; 2 2 3 3 import { version } from "../package.json" with { type: "json" }; 4 - import { createCommand } from "./commands/create.js"; 4 + import { initCommand } from "./commands/init.js"; 5 5 6 6 const main = defineCommand({ 7 7 meta: { ··· 10 10 description: "Bootstrap a new ATProto project", 11 11 }, 12 12 subCommands: { 13 - create: createCommand, 13 + init: initCommand, 14 14 }, 15 15 }); 16 16