diff --git a/README.md b/README.md index f91f58b..76613ca 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,55 @@ -# template npm module +# funkyFlaskTest – npm module template -wapwapfly woooooooooooooooooooooo +This is a simple template repo for making npm modules using **TypeScript** and **Vite**. +The actual module lives in the `source/` directory. +Everything else is just scaffolding or helper files. + +--- + +## What's in here + +- `source/` is where the actual npm module lives + - has its own `package.json`, `src/`, `tsconfig.json`, etc. + - builds to `dist/` + - meant to be published as its own package +- `build/` is an optional local test harness or consumer setup (not required) +- `init.sh` sets the module name and version in `source/` +- `reset.sh` resets the whole repo to the base template + +This layout is not standard npm-style. It's made for people who want their actual module separated from other junk (like CI configs, push scripts, whatever). + +--- + +## Scripts + +### `init.sh` + +```bash +./init.sh --name @your/module-name --version 0.0.1 --once +```` + +* Edits the `source/package.json` and `package-lock.json` to set name and version +* If no args, prompts for them +* If `--once` is passed, deletes itself after running +* Will install `jq` for you if it’s not installed + +Use this once when you create a new module from the template. + +--- + +### `reset.sh` + +```bash +./reset.sh --confirm @your/module-name +``` + +* Resets the whole repo to the original template state +* Only runs if you confirm the current module name (safety check) +* Pulls from `git@git.chipperfluff.at:projects/funkyFlaskTest.git` +* Initializes git if missing + +Used if you want to throw everything away and start fresh from the template repo. + +--- + +That’s it. It’s just a starter for npm modules with Vite and TypeScript, with a weird layout that makes sense if you’re reusing this across multiple projects.