From e2861aa6456d5e05a95050612e6b9724c366c96e Mon Sep 17 00:00:00 2001 From: Sped0n Date: Fri, 3 Nov 2023 10:11:49 +0800 Subject: [PATCH] chore(package.json): update dev, build, and server scripts to improve build process and file copying - Change the "dev" script to only run the rollup:dev and hugo:dev commands, removing the unnecessary file removal step. - Update the "build" script to use the "-f" flag when removing the bundled JS files to avoid errors if the files don't exist. Also, use "yes | cp -rf" to force overwrite the CSS files when copying. - Change the "server" script to only run the rollup:server and hugo:server commands, removing the unnecessary file removal step. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 19aac03..9f8355b 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "sideEffects": false, "scripts": { "lint": "eslint . --fix", - "dev": "rm ./static/bundled/js/* && run-p rollup:dev hugo:dev", - "build": "rm ./static/bundled/js/* && run-s rollup:build hugo:build && cp ./exampleSite/public/css/* ./static/bundled/css", - "server": "rm ./static/bundled/js/* && run-p rollup:server hugo:server", + "dev": "run-p rollup:dev hugo:dev", + "build": "rm -f ./static/bundled/js/* && run-s rollup:build hugo:build && yes | cp -rf ./exampleSite/public/css/* ./static/bundled/css", + "server": "run-p rollup:server hugo:server", "rollup:build": "rollup -c --environment BUILD:production", "rollup:server": "rollup -c --watch --environment BUILD:production", "rollup:dev": "rollup -c --watch --environment BUILD:development",