pulsar/script/generate-sources-gypi
Kevin Sawicki 858f58da97 Precompile less files to css during build
This mirrors the CSON to JSONS compilation step.

Closes #440
2013-03-26 12:05:12 -04:00

36 lines
609 B
Bash
Executable File

#!/bin/sh
set -e
cd "$(dirname $0)/.."
DIRS="src static vendor"
find_files() {
find ${DIRS} -type file -name ${1}
}
file_list() {
while read file; do
echo " '${file}',"
done
}
cat > sources.gypi <<EOF
{
'variables': {
'compiled_sources_dir': '<(INTERMEDIATE_DIR)/atom-resources',
'compiled_sources_dir_xcode': '\${INTERMEDIATE_DIR}/atom-resources',
'coffee_sources': [
$(find_files '*.coffee' | file_list)
],
'cson_sources': [
$(find_files '*.cson' | file_list)
],
'less_sources': [
$(find src static -type file -name '*.less' | file_list)
],
},
}
EOF