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

Side by Side Diff: build_apprtc_closure.py

Issue 872423002: Adding support for AppRTC closure compiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webrtc/webrtc.DEPS/
Patch Set: Created 5 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | copy_apprtc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Invokes the AppRTC closure compiler.
7
8 The AppRTC javascript code must be closure-compiled. This script uses
9 the node toolchain we downloaded earlier.
10 """
11
12 import os
13 import shutil
14 import subprocess
15 import sys
16
17 import utils
18
19
20 def main():
21 node_path = os.path.abspath('node')
22 if not os.path.exists(node_path):
23 return 'Expected node at %s.' % node_path
24 samples_path = os.path.join('src', 'out', 'webrtc-samples')
25 if not os.path.exists(samples_path):
26 return 'Expected webrtc-samples at %s.' % os.path.abspath(samples_path)
27
28 os.chdir(samples_path)
29
30 if utils.GetPlatform() is 'win':
31 npm_bin = os.path.join(node_path, 'npm.cmd')
32 node_bin = os.path.join(node_path, 'node.exe')
33 else:
34 npm_bin = os.path.join(node_path, 'bin', 'npm')
35 node_bin = os.path.join(node_path, 'bin', 'node')
36
37 subprocess.check_call([npm_bin, 'install'])
38 local_grunt_bin = os.path.join('node_modules', 'grunt-cli', 'bin', 'grunt')
39
40 if not os.path.exists(local_grunt_bin):
41 return ('Missing grunt-cli in the webrtc-samples checkout; did '
42 'npm install fail?')
43
44 subprocess.check_call([node_bin, local_grunt_bin, 'closurecompiler:debug'])
45
46
47 if __name__ == '__main__':
48 sys.exit(main())
OLDNEW
« no previous file with comments | « DEPS ('k') | copy_apprtc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698