refactor: move prepare to a dedicated script

This commit is contained in:
Derrick Hammer 2023-06-29 02:17:05 -04:00
parent e73f5f5d10
commit 8eb91b0937
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 12 additions and 2 deletions

View File

@ -21,7 +21,7 @@
}, },
"readme": "ERROR: No README data found!", "readme": "ERROR: No README data found!",
"scripts": { "scripts": {
"prepare": "bash -c 'if command -v presetter &> /dev/null; then presetter bootstrap; fi'", "prepare": "bash ./prepare.sh",
"build": "run build", "build": "run build",
"semantic-release": "semantic-release" "semantic-release": "semantic-release"
}, },
@ -35,7 +35,8 @@
}, },
"files": [ "files": [
"lib/**", "lib/**",
"templates/**" "templates/**",
"prepare.sh"
], ],
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

9
prepare.sh Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if command -v presetter &> /dev/null; then
# shellcheck disable=SC2154
if [ -e "${npm_config_local_prefix}/node_modules/presetter-preset-strict" ]; then
presetter bootstrap
fi
fi