Skip to content

Instantly share code, notes, and snippets.

@ngs
Created October 31, 2010 07:42
Show Gist options
  • Save ngs/656266 to your computer and use it in GitHub Desktop.
Save ngs/656266 to your computer and use it in GitHub Desktop.
cli aliases for javascript tools
function closure {
ARG=$@
if [ "$ARG" = '' ]; then
ARG='--help'
fi;
java com.google.javascript.jscomp.CommandLineRunner $ARG 2>&1;
}
#!/bin/sh
# http://code.google.com/p/closure-compiler/
ARG=$*
if [ "$ARG" = '' ]; then
ARG='--help'
fi
java com.google.javascript.jscomp.CommandLineRunner "$ARG" 2>&1
#!/bin/sh
ARG=$1
BASEDIR=$(dirname $0)
JSLINT="$BASEDIR/jslint.js"
if [ ! -f "$ARG" ]; then
echo "File not found: $ARG"
exit
fi
java org.mozilla.javascript.tools.shell.Main "$JSLINT" "$ARG" 2>&1
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment