Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Side by Side Diff: chrome/browser/resources/chromeos/braille_ime/check_braille_ime.py

Issue 665633002: Compile braille ime among other compiled js resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/lkcr
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/braille_ime/compiled_resources.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2014 The Chromium Authors. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 '''Uses the closure compiler to check the braille ime.''' 7 '''Uses the closure compiler to check the braille ime.'''
8 8
9 import os 9 import os
10 import sys 10 import sys
11 11
12 12
13 _SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 13 _SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
14 14
15 sys.path.insert(0, os.path.join(_SCRIPT_DIR, '..', 'chromevox', 'tools')) 15 sys.path.insert(0, os.path.join(_SCRIPT_DIR, '..', 'chromevox', 'tools'))
16 from jscompilerwrapper import RunCompiler 16 from jscompilerwrapper import RunCompiler
17 17
18 18
19 _CHROME_SOURCE_DIR = os.path.normpath(
20 os.path.join(_SCRIPT_DIR, *[os.path.pardir] * 5))
21
22
19 def CheckBrailleIme(): 23 def CheckBrailleIme():
20 print 'Compiling braille IME.' 24 print 'Compiling braille IME.'
21 js_files = [ 25 js_files = [
22 os.path.join(_SCRIPT_DIR, 'main.js'), 26 os.path.join(_SCRIPT_DIR, 'braille_ime.js'),
23 os.path.join(_SCRIPT_DIR, 'braille_ime.js')] 27 os.path.join(_SCRIPT_DIR, 'main.js')]
24 externs = [os.path.join(_SCRIPT_DIR, 'externs.js')] 28 externs = [
29 os.path.join(
30 _CHROME_SOURCE_DIR,
31 'third_party/closure_compiler/externs/chrome_extensions.js'),
32 os.path.join(_SCRIPT_DIR, 'externs.js')]
25 return RunCompiler(js_files, externs) 33 return RunCompiler(js_files, externs)
26 34
27 35
28 def main(): 36 def main():
29 success, output = CheckBrailleIme() 37 success, output = CheckBrailleIme()
30 if len(output) > 0: 38 if len(output) > 0:
31 print output 39 print output
32 return int(not success) 40 return int(not success)
33 41
34 42
35 if __name__ == '__main__': 43 if __name__ == '__main__':
36 sys.exit(main()) 44 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/braille_ime/compiled_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698