3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 '''Uses the closure compiler to check the braille ime.'''
13 _SCRIPT_DIR
= os
.path
.dirname(os
.path
.abspath(__file__
))
15 sys
.path
.insert(0, os
.path
.join(_SCRIPT_DIR
, '..', 'chromevox', 'tools'))
16 from jscompilerwrapper
import RunCompiler
19 _CHROME_SOURCE_DIR
= os
.path
.normpath(
20 os
.path
.join(_SCRIPT_DIR
, *[os
.path
.pardir
] * 5))
23 def CheckBrailleIme():
24 print 'Compiling braille IME.'
26 os
.path
.join(_SCRIPT_DIR
, 'braille_ime.js'),
27 os
.path
.join(_SCRIPT_DIR
, 'main.js')]
31 'third_party/closure_compiler/externs/chrome_extensions.js'),
32 os
.path
.join(_SCRIPT_DIR
, 'externs.js')]
33 return RunCompiler(js_files
, externs
)
37 success
, output
= CheckBrailleIme()
40 return int(not success
)
43 if __name__
== '__main__':