Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 3 # for details. All rights reserved. Use of this source code is governed by a | |
| 4 # BSD-style license that can be found in the LICENSE file. | |
| 5 | |
| 6 # Traverses apidoc and dartdoc and lists all possible input files that are | |
| 7 # used when building API documentation. Used by gyp to determine when apidocs | |
| 8 # need to be regenerated (see `apidoc.gyp`). | |
| 9 | |
| 10 # TODO(rnystrom): Port this to dart. It can be run before dart has been built | |
|
Ivan Posva
2012/03/30 21:45:02
We don't want to be dependent on Dart to build Dar
| |
| 11 # (which is when this script is invoked by gyp) by using the prebuild dart in | |
| 12 # tools/testing/bin. | |
| 13 | |
| 14 import os | |
| 15 import sys | |
| 16 | |
| 17 def main(argv): | |
| 18 if len(argv) == 1: | |
| 19 dir = os.curdir | |
| 20 else: | |
| 21 dir = argv[1] | |
| 22 for root, directories, files in os.walk(dir): | |
| 23 if root == os.curdir: | |
| 24 directories[0:] = [ | |
| 25 os.path.join('utils', 'apidoc'), | |
| 26 os.path.join('lib', 'dartdoc') | |
| 27 ] | |
| 28 | |
| 29 for filename in files: | |
| 30 if filename.endswith(( | |
| 31 '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt')): | |
| 32 print os.path.relpath(os.path.join(root, filename)) | |
| 33 | |
| 34 if __name__ == '__main__': | |
| 35 sys.exit(main(sys.argv)) | |
| OLD | NEW |