mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Apply review feedback.
This commit is contained in:
@@ -30,14 +30,15 @@
|
||||
# Future work:
|
||||
# - Trim down Google's Apache licenses, to match the output of build.py.
|
||||
# - Generate other compressed files generated by build.py normally.
|
||||
# - Add a good error message if multiple versions of the closure compiler were
|
||||
# found.
|
||||
|
||||
# Find the Closure Compiler.
|
||||
if [ -f "$(npm root)/google-closure-compiler/compiler.jar" ]; then
|
||||
# Travis test.
|
||||
COMPILER="$(npm root)/google-closure-compiler/compiler.jar"
|
||||
elif [ -f *compiler*.jar ]; then
|
||||
# Manual test.
|
||||
COMPILER="*compiler*.jar"
|
||||
elif [ -f closure-compiler*.jar ]; then
|
||||
COMPILER="closure-compiler*.jar"
|
||||
# TODO: Check whether multiple files were found.
|
||||
else
|
||||
echo "ERROR: Closure Compiler not found."
|
||||
echo "Download from this URL, and place jar file in current directory."
|
||||
@@ -45,9 +46,10 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Using $COMPILER as the compiler.
|
||||
rm local_blockly_compressed.js 2> /dev/null
|
||||
echo Compiling Blockly core...
|
||||
java -jar closure-compiler.jar \
|
||||
java -jar $COMPILER \
|
||||
--js='../core/**.js' \
|
||||
--js='../../closure-library/closure/goog/**.js' \
|
||||
--js='../../closure-library/third_party/closure/goog/**.js' \
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# Find the Closure Compiler.
|
||||
if [ -f "$(npm root)/google-closure-compiler/compiler.jar" ]; then
|
||||
# Travis test.
|
||||
COMPILER="$(npm root)/google-closure-compiler/compiler.jar"
|
||||
elif [ -f *compiler*.jar ]; then
|
||||
# Manual test.
|
||||
COMPILER="*compiler*.jar"
|
||||
# TODO: Check whether multiple files were found.
|
||||
else
|
||||
echo "ERROR: Closure Compiler not found."
|
||||
echo "ERROR: Closure Compiler not found."
|
||||
echo "Download from this URL, and place jar file in current directory."
|
||||
echo "https://dl.google.com/closure-compiler/compiler-latest.zip"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Using $COMPILER as the compiler.
|
||||
rm main_compressed.js 2> /dev/null
|
||||
echo Compiling Blockly...
|
||||
java -jar $COMPILER --js='main.js' \
|
||||
|
||||
Reference in New Issue
Block a user