From ce3cdc2c948fdf3b45c948a7fea91241f5f5937a Mon Sep 17 00:00:00 2001 From: MantisClone Date: Wed, 5 Feb 2025 16:26:22 -0500 Subject: [PATCH 1/5] feat: improve clean and deep-clean scripts --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c96fce6b..4336bf1d 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,18 @@ ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "clean": "find . -path './node_modules' -prune -o -name 'dist' -type d -exec rm -rf '{}' \\; -printf '%p deleted\\n' 2>/dev/null", - "deep-clean": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\;", "build": "turbo run build", "build:form": "turbo run build --filter=@requestnetwork/create-invoice-form", "build:dashboard": "turbo run build --filter=@requestnetwork/invoice-dashboard", "build:stakeholder": "turbo run build --filter=@requestnetwork/add-stakeholder", "build:payment-widget": "turbo run build --filter=@requestnetwork/payment-widget", "build:single-invoice": "turbo run build --filter=@requestnetwork/single-invoice", + "clean": "npm run clean:dist && npm run clean:sveltekit", + "clean:dist": "find . -name 'dist' -type d -prune -print -exec rm -rf '{}' \\;", + "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\;", + "deep-clean": "npm run clean && npm run deep-clean:turbo && npm run deep-clean:node-modules", + "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\;", + "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\;", "link:react": "npm link $npm_config_app_path/node_modules/react $npm_config_app_path/node_modules/react-dom", "link:all": "npm run link:react --app-path=$npm_config_app_path && for d in packages/*; do (cd $d && npm link); done", "unlink:all": "for d in packages/*; do (cd $d && npm unlink); done" From 3c4fb6ab9932afd090514b529c1399ed1b502c79 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Wed, 5 Feb 2025 17:14:30 -0500 Subject: [PATCH 2/5] feat: make the clean:dist script skip node_modules. Improve log statement --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4336bf1d..395af147 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "build:payment-widget": "turbo run build --filter=@requestnetwork/payment-widget", "build:single-invoice": "turbo run build --filter=@requestnetwork/single-invoice", "clean": "npm run clean:dist && npm run clean:sveltekit", - "clean:dist": "find . -name 'dist' -type d -prune -print -exec rm -rf '{}' \\;", - "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\;", + "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", + "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", "deep-clean": "npm run clean && npm run deep-clean:turbo && npm run deep-clean:node-modules", - "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\;", - "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\;", + "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", + "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", "link:react": "npm link $npm_config_app_path/node_modules/react $npm_config_app_path/node_modules/react-dom", "link:all": "npm run link:react --app-path=$npm_config_app_path && for d in packages/*; do (cd $d && npm link); done", "unlink:all": "for d in packages/*; do (cd $d && npm unlink); done" From 55acf3c753ddca3cbc2918a18383579a3ed8028e Mon Sep 17 00:00:00 2001 From: MantisClone Date: Wed, 5 Feb 2025 17:18:10 -0500 Subject: [PATCH 3/5] Make all clean and deep-clean scripts suppress error messages --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 395af147..ab4a6717 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "build:payment-widget": "turbo run build --filter=@requestnetwork/payment-widget", "build:single-invoice": "turbo run build --filter=@requestnetwork/single-invoice", "clean": "npm run clean:dist && npm run clean:sveltekit", - "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", - "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", + "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", "deep-clean": "npm run clean && npm run deep-clean:turbo && npm run deep-clean:node-modules", - "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", - "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n'", + "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", "link:react": "npm link $npm_config_app_path/node_modules/react $npm_config_app_path/node_modules/react-dom", "link:all": "npm run link:react --app-path=$npm_config_app_path && for d in packages/*; do (cd $d && npm link); done", "unlink:all": "for d in packages/*; do (cd $d && npm unlink); done" From 77180b5b41188e82003f836f4c0ca86cfe270b19 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Wed, 5 Feb 2025 17:23:33 -0500 Subject: [PATCH 4/5] fix: remove extra -prune and -print options --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ab4a6717..03d2f485 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "build:payment-widget": "turbo run build --filter=@requestnetwork/payment-widget", "build:single-invoice": "turbo run build --filter=@requestnetwork/single-invoice", "clean": "npm run clean:dist && npm run clean:sveltekit", - "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", - "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", "deep-clean": "npm run clean && npm run deep-clean:turbo && npm run deep-clean:node-modules", - "deep-clean:turbo": "find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", - "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "deep-clean:turbo": "find . -name '.turbo' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", "link:react": "npm link $npm_config_app_path/node_modules/react $npm_config_app_path/node_modules/react-dom", "link:all": "npm run link:react --app-path=$npm_config_app_path && for d in packages/*; do (cd $d && npm link); done", "unlink:all": "for d in packages/*; do (cd $d && npm unlink); done" From 48d41b28f1635b25433f1b535d0fc9ca4d3601c9 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Wed, 5 Feb 2025 17:42:56 -0500 Subject: [PATCH 5/5] fix: prints --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 03d2f485..1dd12142 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "build:payment-widget": "turbo run build --filter=@requestnetwork/payment-widget", "build:single-invoice": "turbo run build --filter=@requestnetwork/single-invoice", "clean": "npm run clean:dist && npm run clean:sveltekit", - "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", - "clean:sveltekit": "find . -name '.svelte-kit' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "clean:dist": "find . -path ./node_modules -prune -o -name 'dist' -type d -exec rm -rf '{}' + -exec echo '{}' deleted \\;", + "clean:sveltekit": "find . -name '.svelte-kit' -type d -exec rm -rf '{}' + -exec echo '{}' deleted \\;", "deep-clean": "npm run clean && npm run deep-clean:turbo && npm run deep-clean:node-modules", - "deep-clean:turbo": "find . -name '.turbo' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", - "deep-clean:node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' \\; -printf '%p deleted\n' 2>/dev/null", + "deep-clean:turbo": "find . -name '.turbo' -type d -exec rm -rf '{}' + -exec echo '{}' deleted \\;", + "deep-clean:node-modules": "find . -name 'node_modules' -type d -exec rm -rf '{}' + -exec echo '{}' deleted \\;", "link:react": "npm link $npm_config_app_path/node_modules/react $npm_config_app_path/node_modules/react-dom", "link:all": "npm run link:react --app-path=$npm_config_app_path && for d in packages/*; do (cd $d && npm link); done", "unlink:all": "for d in packages/*; do (cd $d && npm unlink); done"