diff --git a/README.md b/README.md index b205804..416b66d 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 +## Bundling Static Modules + +> Prerequisite software: Node.js v20 (minimum supported version) To install dependencies into the `node_modules` directory run this command. @@ -107,19 +109,18 @@ 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 watch command compiles the components then watches the files and recompiles when one of them changes. +> You can skip the next step until you make changes in the `src/App/assets` folder -```shell -npm run watch -``` +The build command compiles the components from the `src/App/assets` folder into the `public` folder. -After all updates are done, this command compiles the assets locally, minifies them and makes them ready for production. +> This command overwrites existing files in the `public` folder. ```shell -npm run prod -``` +npm run build +``` ## Running the application diff --git a/package.json b/package.json index 8c21d96..1341c6e 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "index.js", "type": "module", "scripts": { - "preview": "php -S 0.0.0.0:8080 -t public", - "build": "vite build --watch" + "watch": "vite build --watch", + "build": "vite build" }, "repository": { "type": "git",