electron/script/compile-coffee.py
Cheng Zhao 317bd0debf Discard the extra node binary.
We now use atom-shell's binary to execute scripts.
2013-08-08 16:57:07 +08:00

23 lines
468 B
Python
Executable file

#!/usr/bin/env python
import os
import subprocess
import sys
from lib.util import *
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
input_file = sys.argv[1]
output_dir = os.path.dirname(sys.argv[2])
coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin',
'coffee')
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
if __name__ == '__main__':
sys.exit(main())