From 633b7447928254e59d602c59c5eca058f6e32789 Mon Sep 17 00:00:00 2001 From: bidi Date: Tue, 29 Apr 2025 12:27:29 +0300 Subject: [PATCH 1/3] updated readme - static modules Signed-off-by: bidi --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b205804..ef985b4 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,9 @@ composer development-enable - If not already done, remove the `.dist` extension from `config/autoload/development.local.php.dist`. -## NPM Commands +## Bundle Static Modules + +> Prerequisite software: Node.js v20 (minimum supported version) To install dependencies into the `node_modules` directory run this command. @@ -107,20 +109,15 @@ To install dependencies into the `node_modules` directory run this command. npm install ``` -- If `npm install` fails, this could be caused by user permissions of npm. Recommendation is to install npm through `Node Version Manager`. +> If `npm install` fails, this could be caused by user permissions of npm. +Recommendation is to install npm through `Node Version Manager`. -The watch command compiles the components then watches the files and recompiles when one of them changes. +The build command compiles the components then monitors the source files and triggers their recompilation when one of them is changed. ```shell -npm run watch +npm run build ``` -After all updates are done, this command compiles the assets locally, minifies them and makes them ready for production. - -```shell -npm run prod -``` - ## Running the application We recommend running your applications in WSL: From bd1e38e4249ed06105a6a06c240d51de6e3c417c Mon Sep 17 00:00:00 2001 From: bidi Date: Tue, 29 Apr 2025 12:48:37 +0300 Subject: [PATCH 2/3] updated vite - removed preview Signed-off-by: bidi --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8c21d96..1f1f151 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "main": "index.js", "type": "module", "scripts": { - "preview": "php -S 0.0.0.0:8080 -t public", "build": "vite build --watch" }, "repository": { From 5deb11ff3efb69015d5c6b8f3f61f8c405e02760 Mon Sep 17 00:00:00 2001 From: bidi Date: Tue, 29 Apr 2025 13:08:01 +0300 Subject: [PATCH 3/3] updated vite commands, readme Signed-off-by: bidi --- README.md | 12 ++++++++---- package.json | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ef985b4..416b66d 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ composer development-enable - If not already done, remove the `.dist` extension from `config/autoload/development.local.php.dist`. -## Bundle Static Modules +## Bundling Static Modules > Prerequisite software: Node.js v20 (minimum supported version) @@ -109,10 +109,14 @@ To install dependencies into the `node_modules` directory run this command. npm install ``` -> If `npm install` fails, this could be caused by user permissions of npm. -Recommendation is to install npm through `Node Version Manager`. +If `npm install` fails, this could be caused by user permissions of npm. +We recommend installing npm through `Node Version Manager`. -The build command compiles the components then monitors the source files and triggers their recompilation when one of them is changed. +> You can skip the next step until you make changes in the `src/App/assets` folder + +The build command compiles the components from the `src/App/assets` folder into the `public` folder. + +> This command overwrites existing files in the `public` folder. ```shell npm run build diff --git a/package.json b/package.json index 1f1f151..1341c6e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "type": "module", "scripts": { - "build": "vite build --watch" + "watch": "vite build --watch", + "build": "vite build" }, "repository": { "type": "git",