cloudflare/cloudflare-typescript
Publicmirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable
scripts/utils/git-swap.sh
13lines · modecode
| 1 | #!/usr/bin/env bash |
| 2 | set -exuo pipefail |
| 3 | # the package is published to NPM from ./dist |
| 4 | # we want the final file structure for git installs to match the npm installs, so we |
| 5 | |
| 6 | # delete everything except ./dist and ./node_modules |
| 7 | find . -maxdepth 1 -mindepth 1 ! -name 'dist' ! -name 'node_modules' -exec rm -rf '{}' + |
| 8 | |
| 9 | # move everything from ./dist to . |
| 10 | mv dist/* . |
| 11 | |
| 12 | # delete the now-empty ./dist |
| 13 | rmdir dist |