From b8d0e3589ad75915022e66e223151cbb403066a4 Mon Sep 17 00:00:00 2001 From: Arno V Date: Thu, 18 Apr 2024 08:33:26 -0400 Subject: [PATCH] chore: examples should restart in dev if code changed --- examples/with-vite/nodemon.json | 11 +++++++++++ examples/with-vite/package.json | 4 ++-- examples/with-webpack/nodemon.json | 11 +++++++++++ examples/with-webpack/package.json | 5 +++-- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 examples/with-vite/nodemon.json create mode 100644 examples/with-webpack/nodemon.json diff --git a/examples/with-vite/nodemon.json b/examples/with-vite/nodemon.json new file mode 100644 index 00000000..aa145706 --- /dev/null +++ b/examples/with-vite/nodemon.json @@ -0,0 +1,11 @@ +{ + "watch": [ + "tailwind.config.js", + "src/**/*.*", + "../../packages/ui-components/src/**/*.*", + "../../packages/ui-components/lib/**/*.*", + "../../packages/ui-styles/src/**/*.*", + "../../packages/ui-form/src/**/*.*", + "../../packages/ui-icons/src/**/*.*" + ] +} diff --git a/examples/with-vite/package.json b/examples/with-vite/package.json index 65fe1edb..03b21eb3 100644 --- a/examples/with-vite/package.json +++ b/examples/with-vite/package.json @@ -5,10 +5,10 @@ "type": "module", "scripts": { "clean": "rimraf dist", - "dev": "vite", + "dev": "nodemon", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "start": "vite" }, "dependencies": { "@versini/ui-components": "workspace:../../packages/ui-components", diff --git a/examples/with-webpack/nodemon.json b/examples/with-webpack/nodemon.json new file mode 100644 index 00000000..aa145706 --- /dev/null +++ b/examples/with-webpack/nodemon.json @@ -0,0 +1,11 @@ +{ + "watch": [ + "tailwind.config.js", + "src/**/*.*", + "../../packages/ui-components/src/**/*.*", + "../../packages/ui-components/lib/**/*.*", + "../../packages/ui-styles/src/**/*.*", + "../../packages/ui-form/src/**/*.*", + "../../packages/ui-icons/src/**/*.*" + ] +} diff --git a/examples/with-webpack/package.json b/examples/with-webpack/package.json index 25c66e34..7514f863 100644 --- a/examples/with-webpack/package.json +++ b/examples/with-webpack/package.json @@ -6,8 +6,9 @@ "clean": "rimraf dist", "build:js": "webpack --mode=production", "build": "npm run clean && npm run build:js", - "dev": "webpack serve --mode=development", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" + "dev": "nodemon", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "start": "webpack serve --mode=development" }, "dependencies": { "@versini/ui-components": "workspace:../../packages/ui-components",