Consolidate *.do files
This commit is contained in:
parent
081074a39c
commit
caf5302c18
2
all.do
2
all.do
|
@ -1 +1 @@
|
|||
for p in packages/*; do [ -f $p/all.do ] && echo $p/all; done | xargs redo-ifchange
|
||||
for p in packages/*/; do echo $p/all; done | xargs redo-ifchange
|
||||
|
|
2
clean.do
2
clean.do
|
@ -1 +1 @@
|
|||
for p in packages/*; do [ -f $p/clean.do ] && echo $p/clean; done | xargs redo
|
||||
for p in packages/*/; do echo $p/clean; done | xargs redo
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
cd "$(dirname "$1")"
|
||||
case "$1" in
|
||||
*/all)
|
||||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
||||
[ -f webpack.config.js ] && redo-ifchange dist/main.js
|
||||
[ -f _all.do ] && redo-ifchange _all || true
|
||||
;;
|
||||
*/clean)
|
||||
rm -rf lib
|
||||
rm -rf dist
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,30 @@
|
|||
# To be invoked with PACKAGENAME/lib/FOO.js or PACKAGENAME/dist/main.js
|
||||
targettempfile="$(pwd)/$3"
|
||||
mkdir -p "$(dirname "$1")"
|
||||
cd "$(dirname "$1")"/..
|
||||
case "$1" in
|
||||
syntax/lib/babel_parser.js)
|
||||
src=node_modules/@babel/parser/lib/index.js
|
||||
[ -f "$src" ] || npm -i .
|
||||
redo-ifchange "$src" babel_parser_suffix.js
|
||||
cat "$src" babel_parser_suffix.js
|
||||
;;
|
||||
syntax/lib/*)
|
||||
file=$(basename "$1")
|
||||
redo-ifchange "src/$file"
|
||||
npx babel "src/$file"
|
||||
;;
|
||||
*/lib/*)
|
||||
redo-ifchange ../syntax/all
|
||||
file=$(basename "$1")
|
||||
redo-ifchange "src/$file"
|
||||
npx syndicate-babel "src/$file"
|
||||
;;
|
||||
*/dist/*)
|
||||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
||||
for maybedep in $(npx webpack --json -o "$targettempfile" | jq -r '.modules[].identifier')
|
||||
do
|
||||
[ -f "$maybedep" ] && echo "$maybedep"
|
||||
done | xargs redo-ifchange
|
||||
;;
|
||||
esac
|
|
@ -1 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,5 +0,0 @@
|
|||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
|
@ -1 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,5 +0,0 @@
|
|||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
|
@ -1 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,5 +0,0 @@
|
|||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
|
@ -1 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,5 +0,0 @@
|
|||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
|
@ -1 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,5 +0,0 @@
|
|||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
|
@ -1,2 +0,0 @@
|
|||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
||||
redo-ifchange dist/main.js
|
|
@ -1,2 +0,0 @@
|
|||
rm -rf lib
|
||||
rm -rf dist
|
|
@ -1,16 +0,0 @@
|
|||
mkdir -p $(dirname "$1")
|
||||
case "$1" in
|
||||
lib/*)
|
||||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
[ -f ../syntax/all.do ] && redo-ifchange ../syntax/all
|
||||
redo-ifchange "$src"
|
||||
mkdir -p $(dirname "$1")
|
||||
npx syndicate-babel "$src"
|
||||
;;
|
||||
dist/*)
|
||||
for maybedep in $(npx webpack --json -o "$3" | jq -r '.modules[].identifier')
|
||||
do
|
||||
[ -f "$maybedep" ] && echo "$maybedep"
|
||||
done | xargs redo-ifchange
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1 @@
|
|||
redo-ifchange lib/babel_parser.js
|
|
@ -1,3 +0,0 @@
|
|||
exec >&2
|
||||
redo-ifchange lib/babel_parser.js
|
||||
for d in src/*.js; do echo lib/$(basename $d); done | xargs redo-ifchange
|
|
@ -1 +0,0 @@
|
|||
rm -rf lib
|
|
@ -1,14 +0,0 @@
|
|||
mkdir -p $(dirname "$1")
|
||||
case "$1" in
|
||||
lib/babel_parser.js)
|
||||
src=node_modules/@babel/parser/lib/index.js
|
||||
[ -f "$src" ] || npm -i .
|
||||
redo-ifchange "$src" babel_parser_suffix.js
|
||||
cat "$src" babel_parser_suffix.js
|
||||
;;
|
||||
*)
|
||||
src=$(echo "$1" | sed -e 's:^lib/:src/:')
|
||||
redo-ifchange "$src"
|
||||
npx babel "$src"
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue