From 5a0f27557e63315fc31605a59e17c289e7a64f8b Mon Sep 17 00:00:00 2001 From: brenopolanski Date: Wed, 2 Sep 2026 14:12:25 -0300 Subject: [PATCH] docs: add local demo instructions and a root script --- CONTRIBUTING.md | 4 +--- README.md | 8 +++++++- package.json | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de2bbe201..4736fa5b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,14 +9,12 @@ ## Demo Development Server -- `npm start` from `demo` directory will run the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading. +- `npm run dev` from the `demo` directory runs the demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading. The demo imports the component straight from `src/`, so it doubles as a development harness. ## Running Tests - `npm test` will run the tests once. - - `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`. - - `npm run test:watch` will run the tests on every change. ## Building diff --git a/README.md b/README.md index 495e63de0..9022605b8 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,13 @@ Use it when you need email template creation inside your app without building an ## Live Demo -Check out the live demo here: https://react-email-editor-demo.netlify.app/ ([Source Code](https://github.com/unlayer/react-email-editor/tree/master/demo/src)) +Check out the live demo here: https://react-email-editor-demo.netlify.app/ ([Source Code](https://github.com/unlayer/react-email-editor/tree/master/demo/src)), or run it locally — a Vite-based demo lives in [`demo/`](demo): + +```sh +cd demo +npm install +npm run +``` ## Installation diff --git a/package.json b/package.json index 153062eb7..eea22e8bb 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ }, "scripts": { "start": "tsup --watch", + "dev": "npm --prefix demo install && npm --prefix demo run dev", "build": "tsup", "test": "vitest run", "test:legacy": "vitest run --config vitest.legacy.config.ts",