Skip to content

Commit 45a2cba

Browse files
added # comments support to ignore files in manifest
1 parent ad5f2ea commit 45a2cba

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

compile-js.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ if [ "$command" == "build" ]
4242
then
4343
for f in "$@"
4444
do
45-
if [ "$f" != "$1" ] && [ "$f" != "$2" ] && [[ $f == *.js ]]
45+
if [ "$f" != "$1" ] && [ "$f" != "$2" ] && [[ $f == *.du ]] && [[ $f != *"#"* ]]
4646
then
47+
# echo $f
4748
files=$files$f' '
4849
fi
4950
done
@@ -60,12 +61,17 @@ fi
6061

6162

6263
for f in $files ; do
63-
list=$list'--js '$f' '
64-
if test $f -nt $output
64+
# skip commented lines
65+
if [[ $f != "#"* ]]
6566
then
66-
echo $f' is newer then '$output
67-
stale=true
67+
list=$list'--js '$f' '
68+
if test $f -nt $output
69+
then
70+
echo $f' is newer then '$output
71+
stale=true
72+
fi
6873
fi
74+
6975
done
7076

7177
#echo -e $files
@@ -82,5 +88,5 @@ else
8288
echo "No new files to compile."
8389
fi
8490

85-
fi
8691

92+
fi

0 commit comments

Comments
 (0)