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

Side by Side Diff: web/web.py

Issue 2969643003: [web] Update packages, use TS 2.4 (Closed)
Patch Set: [web] Update packages, use TS 2.4 Created 3 years, 5 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
« no previous file with comments | « web/package.json ('k') | no next file » | 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 # Copyright 2016 The LUCI Authors. All rights reserved. 2 # Copyright 2016 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Manages web/ resource checkout and building. 6 """Manages web/ resource checkout and building.
7 7
8 This script can be run in one of three modes: 8 This script can be run in one of three modes:
9 - As "initialize.py", it will perform resource dependency checkout for 9 - As "initialize.py", it will perform resource dependency checkout for
10 "luci_deploy" and quit. 10 "luci_deploy" and quit.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 system. Please install Node.js and NPM. Installation instructions can be found 54 system. Please install Node.js and NPM. Installation instructions can be found
55 at: 55 at:
56 https://docs.npmjs.com/getting-started/installing-node 56 https://docs.npmjs.com/getting-started/installing-node
57 """ 57 """
58 raise Exception('Unable to locate Node.js installation.') 58 raise Exception('Unable to locate Node.js installation.')
59 tc = cls(web_dir, *node_js) 59 tc = cls(web_dir, *node_js)
60 60
61 # Install NPM deps from "package.json". 61 # Install NPM deps from "package.json".
62 def install_npm_deps(): 62 def install_npm_deps():
63 tc.npm('install', cwd=web_dir) 63 tc.npm('install', cwd=web_dir)
64 tc.npm('prune', cwd=web_dir)
64 cls._call_if_outdated( 65 cls._call_if_outdated(
65 install_npm_deps, 66 install_npm_deps,
66 os.path.join(web_dir, '.npm.installed'), 67 os.path.join(web_dir, '.npm.installed'),
67 os.path.join(web_dir, 'package.json'), 68 os.path.join(web_dir, 'package.json'),
68 [os.path.join(web_dir, 'node_modules')], 69 [os.path.join(web_dir, 'node_modules')],
69 force) 70 force)
70 71
71 # Install Bower deps from "bower.json". 72 # Install Bower deps from "bower.json".
72 def install_bower_deps(): 73 def install_bower_deps():
73 tc.bower('install', cwd=web_dir) 74 tc.bower('install', cwd=web_dir)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return _main_initialize(args) 289 return _main_initialize(args)
289 elif script_name == 'build.py': 290 elif script_name == 'build.py':
290 return _main_deploy(args) 291 return _main_deploy(args)
291 else: 292 else:
292 return _main(args) 293 return _main(args)
293 294
294 295
295 if __name__ == '__main__': 296 if __name__ == '__main__':
296 logging.basicConfig(level=logging.INFO) 297 logging.basicConfig(level=logging.INFO)
297 sys.exit(main(sys.argv)) 298 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « web/package.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698