diff --git a/package.json b/package.json index b6153d9..180ceb3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "readme": "ERROR: No README data found!", "scripts": { - "prepare": "bash -c 'if command -v presetter &> /dev/null; then presetter bootstrap; fi'", + "prepare": "bash ./prepare.sh", "build": "run build", "semantic-release": "semantic-release" }, @@ -35,7 +35,8 @@ }, "files": [ "lib/**", - "templates/**" + "templates/**", + "prepare.sh" ], "publishConfig": { "access": "public" diff --git a/prepare.sh b/prepare.sh new file mode 100644 index 0000000..8e2391b --- /dev/null +++ b/prepare.sh @@ -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