diff --git a/compiler/forget/package.json b/compiler/forget/package.json index 04912784bd..5502f54147 100644 --- a/compiler/forget/package.json +++ b/compiler/forget/package.json @@ -9,6 +9,8 @@ "url": "git+https://github.com/facebook/react-forget.git" }, "scripts": { + "bundle:meta": "scripts/bundle-meta.sh", + "hash": "scripts/hash.sh", "start": "yarn workspace playground run start", "next": "yarn workspace playground run dev", "build": "yarn workspaces run build", diff --git a/compiler/forget/packages/babel-plugin-react-forget/package.json b/compiler/forget/packages/babel-plugin-react-forget/package.json index dba00aa428..5ee26dd8e7 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/package.json +++ b/compiler/forget/packages/babel-plugin-react-forget/package.json @@ -9,8 +9,6 @@ ], "scripts": { "build": "rimraf dist && tsc", - "bundle:meta": "scripts/bundle-meta.sh", - "hash": "scripts/hash-dist.sh", "test": "yarn jest && yarn snap:build && yarn snap", "jest": "tsc && jest", "snap": "node ../snap/dist/main.js", diff --git a/compiler/forget/packages/babel-plugin-react-forget/scripts/hash-dist.sh b/compiler/forget/packages/babel-plugin-react-forget/scripts/hash-dist.sh deleted file mode 100755 index 8c060ac31d..0000000000 --- a/compiler/forget/packages/babel-plugin-react-forget/scripts/hash-dist.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -# Hashes JS files in the dist directory to create a cache-breaker - -find dist -name '*.js' | sort | xargs shasum | shasum | awk '{ print $1 }' > dist/HASH diff --git a/compiler/forget/scripts/hash.sh b/compiler/forget/scripts/hash.sh new file mode 100755 index 0000000000..89b55b9231 --- /dev/null +++ b/compiler/forget/scripts/hash.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -eo pipefail + +# Hashes JS files in the provided directory to create a cache-breaker + +find $1 -name '*.js' | sort | xargs shasum | shasum | awk '{ print $1 }'