Skip to content
Snippets Groups Projects
Commit 1e0b0d4a authored by ezsh's avatar ezsh
Browse files

Add a sript to check JS validity

A simple test by nodejs that can be put inside the Git pre-commit hook
that checks for basic syntax violations.
parent 629a0afc
No related branches found
No related tags found
1 merge request!6844CheckJS.sh and a fix to makeTwineJS
#!/bin/sh
tmpJoinedFile=`mktemp --suffix=.js`
files=$(find js src -name '*.js' -print)
files=$(echo "$files" | sort)
for f in $files; do
printf "\n/* ${f} */\n" >> "$tmpJoinedFile"
cat "$f" >> "$tmpJoinedFile"
done
node -c "$tmpJoinedFile"
test $? -eq 0 && rm "$tmpJoinedFile"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment