Skip to content

Instantly share code, notes, and snippets.

@KSXGitHub
Last active February 27, 2020 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KSXGitHub/2f5c56231897eaa067aa636d81ceca5f to your computer and use it in GitHub Desktop.
Save KSXGitHub/2f5c56231897eaa067aa636d81ceca5f to your computer and use it in GitHub Desktop.
#! /usr/bin/env zsh
script=https://ksxgithub.github.io/my-deno-scripts/cmd/insert-object-key.ts
deno fetch $script
run=(deno run $script)
insert=($run --before dependencies)
args-to-list packages/*/package.json | while read filename; do
echo '>>>' $filename
< $filename |
$insert browser '"index.mjs"' |
$insert module '"index.mjs"' |
$insert main '"index.js"' |
> $filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment