2019-04-20 19:23:22 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# We'll have to come up with a cross-platform way to handle this
|
|
|
|
# (as in, make sure it works on windows), but until that time
|
|
|
|
# this shell script will do.
|
|
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
CUR=`pwd`
|
|
|
|
|
|
|
|
cd $DIR/../src/
|
2019-04-29 09:01:51 +02:00
|
|
|
rm -rf dist
|
2019-04-20 19:23:22 +02:00
|
|
|
for d in * ; do {
|
|
|
|
cd ..
|
2019-04-29 09:01:51 +02:00
|
|
|
mkdir -p dist/$d
|
2019-04-27 12:21:41 +02:00
|
|
|
echo "Building $d"
|
2019-04-29 09:01:51 +02:00
|
|
|
rollup -c ./rollup.config.js ./src/$d/index.js -m -o dist/$d/index.js -f cjs
|
|
|
|
rollup --silent -c ./rollup.config.js ./src/$d/index.js -m -o dist/$d/index.mjs -f es
|
2019-04-20 19:23:22 +02:00
|
|
|
cd src
|
|
|
|
}
|
|
|
|
done
|
|
|
|
cd $CUR
|
|
|
|
|
|
|
|
|