File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ REPO_ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
5+ DEST=" $HOME /work/core/shared/js/tldraw"
6+ PACKAGES=(tldraw editor)
7+
8+ mkdir -p " $DEST "
9+
10+ for pkg in " ${PACKAGES[@]} " ; do
11+ pkg_dir=" $REPO_ROOT /packages/$pkg "
12+ pkg_json=" $pkg_dir /package.json"
13+
14+ name=$( node -e " console.log(require('$pkg_json ').name)" )
15+ version=$( node -e " console.log(require('$pkg_json ').version)" )
16+
17+ # strip the @tldraw/ scope to get the short name
18+ short_name=" ${name#@ tldraw/ } "
19+
20+ echo " ==> Packing $name @$version "
21+ (cd " $pkg_dir " && yarn pack-tarball)
22+
23+ src=" $pkg_dir /package.tgz"
24+ dest_file=" $DEST /tldraw-${short_name} -${version} .tgz"
25+
26+ echo " Copying -> $dest_file "
27+ cp " $src " " $dest_file "
28+ done
29+
30+ echo " "
31+ echo " Done. Files in $DEST :"
32+ ls " $DEST "
You can’t perform that action at this time.
0 commit comments