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

Side by Side Diff: utils/apidoc/scripts/list_files.py

Issue 9705088: Generate API docs during build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix arg parsing. Created 8 years, 8 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
OLDNEW
(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))
OLDNEW
« utils/apidoc/apidoc.gyp ('K') | « utils/apidoc/scripts/list_files.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698