Add wrapper script for coffeelint.

This commit is contained in:
Cheng Zhao 2013-09-27 10:49:55 +08:00
parent 561857d640
commit 11f387743f
2 changed files with 31 additions and 0 deletions

View file

@ -12,6 +12,7 @@ def main():
run_script('bootstrap.py') run_script('bootstrap.py')
run_script('cpplint.py') run_script('cpplint.py')
run_script('pylint.py') run_script('pylint.py')
run_script('coffeelint.py')
run_script('build.py') run_script('build.py')
run_script('test.py', ['--ci']) run_script('test.py', ['--ci'])
run_script('create-dist.py') run_script('create-dist.py')

30
script/coffeelint.py Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env python
import glob
import os
import subprocess
import sys
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
os.chdir(SOURCE_ROOT)
coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', 'coffeelint', 'bin',
'coffeelint')
files = glob.glob('browser/api/lib/*.coffee') + \
glob.glob('renderer/api/lib/*.coffee') + \
glob.glob('common/api/lib/*.coffee') + \
glob.glob('browser/atom/*.coffee')
if sys.platform in ['win32', 'cygwin']:
subprocess.check_call(['node', coffeelint] + files,
executable='C:/Program Files/nodejs/node.exe')
else:
subprocess.check_call(['node', coffeelint] + files)
if __name__ == '__main__':
sys.exit(main())