Initial Commit
This commit is contained in:
16
scripts/prepare-package-json.sh
Normal file
16
scripts/prepare-package-json.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
distDirectory=${DIST_DIRECTORY:-"dist"}
|
||||
packageJsonPath=${PACKAGE_JSON_PATH:-"package.json"}
|
||||
|
||||
if [ ! -d "${distDirectory}" ]; then
|
||||
echo "Unable to prepare package.json, [${distDirectory}] not found"
|
||||
exit $LINENO
|
||||
fi
|
||||
|
||||
echo "Preparing [package.json] to [${distDirectory}]"
|
||||
jq '{name, version, author, type, types, exports, files, publishConfig}' "${packageJsonPath}" > "${distDirectory}/package.json"
|
||||
Reference in New Issue
Block a user