Better Transpilation

This commit is contained in:
Dinhero21 2024-01-18 10:28:18 -03:00
parent c5cc2c8c27
commit 70d885c922
3 changed files with 11 additions and 3 deletions

3
.swcrc
View file

@ -16,7 +16,8 @@
},
"exclude": [
"\\.js$",
"\\.d\\.ts$"
"\\.d\\.ts$",
"node_modules"
],
"module": {
"type": "es6"

View file

@ -4,12 +4,17 @@ SOURCE=$1
if [ -z "$SOURCE" ]
then
SOURCE="src/"
SOURCE="src"
fi
# length of "src/" = 4
TARGET="${SOURCE:4}"
if [ -z "$TARGET" ]
then
TARGET="."
fi
TARGET="dist/$TARGET"
rsync -rav --exclude="*.ts" $SOURCE $TARGET
rsync -rav --exclude="*.ts" $SOURCE/ $TARGET/

View file

@ -1 +1,3 @@
./script/copy.sh
inotifywait -rm -e CLOSE_WRITE --format "%w" src | stdbuf -o0 sed 's@/$@@' | xargs -n1 -I{} ./script/copy.sh {}