When getting people up and running with automerge it's painful to go through the whole ceremony of setting up a vite app, installing automerge dependencies, and setting up the react hooks just to demonstrate simple functionality. This patch adds an @automerge/create-vite-app which allows you to run npm create @automerge/vite-app to quickly spin up a Vite + React + Typescript project with a simple counter app inside it.
Most of this is just template code in packages/create-vite-app/template. The code which actually sets up the new project is in packages/create-vite-app/index.ts.
If you want to have a play with this the easiest way I've found to test things is to run npm pack in the create-vite-app package, then npm install <the tarball we just created> in a new project and finally ./node_modules/@automerge/create-vite-app/dist/index.js to actually run the helper.
When getting people up and running with automerge it's painful to go through the whole ceremony of setting up a vite app, installing automerge dependencies, and setting up the react hooks just to demonstrate simple functionality. This patch adds an
@automerge/create-vite-app
which allows you to runnpm create @automerge/vite-app
to quickly spin up a Vite + React + Typescript project with a simple counter app inside it.Most of this is just template code in
packages/create-vite-app/template
. The code which actually sets up the new project is inpackages/create-vite-app/index.ts
.If you want to have a play with this the easiest way I've found to test things is to run
npm pack
in thecreate-vite-app
package, thennpm install <the tarball we just created>
in a new project and finally./node_modules/@automerge/create-vite-app/dist/index.js
to actually run the helper.