Write js codes in coffee script.

This commit is contained in:
Cheng Zhao 2013-04-14 22:48:35 +08:00
parent ad708fdfbd
commit ee420b1590
7 changed files with 75 additions and 15 deletions

View file

@ -23,6 +23,9 @@ BRIGHTRAY_DIR="${VENDOR_DIR}/brightray"
git submodule sync --quiet
git submodule update --init --recursive
npm install npm --silent
./node_modules/.bin/npm install --silent
"${BRIGHTRAY_DIR}/script/bootstrap" "${BASE_URL}"
"${SOURCE_ROOT}/script/update"

21
script/compile-coffee Executable file
View file

@ -0,0 +1,21 @@
#!/bin/sh
set -e
# Because of the way xcodebuild invokes external scripts we need to load
# The Setup's environment ourselves. If this isn't done, things like the
# node shim won't be able to find the stuff they need.
node --version > /dev/null 2>&1 || {
if [ -e /opt/github/env.sh ]; then
source /opt/github/env.sh
else
# Try Constructicon's PATH.
export PATH="/usr/local/Cellar/node/0.8.21/bin:${PATH}"
fi
}
INPUT_FILE="${1}"
OUTPUT_DIR=`dirname "$2"`
node_modules/.bin/coffee -c -o "$OUTPUT_DIR" "$INPUT_FILE"