diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de2bbe20..4736fa5b 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 495e63de..9022605b 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 153062eb..eea22e8b 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",