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

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: Port list_files back to python. Created 8 years, 9 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
« utils/apidoc/apidoc.dart ('K') | « utils/apidoc/apidoc.gyp ('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
(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`).
dgrove 2012/03/30 17:46:31 Can this be written in dart?
Bob Nystrom 2012/03/30 18:01:40 It was initially. It turns out, no. This script is
dgrove 2012/03/30 18:16:25 As we discussed, this could use the prebuilt VM th
Bob Nystrom 2012/03/30 19:00:58 Done.
9
10 import os
11 import sys
12
13 def main(argv):
14 if len(argv) == 1:
15 dir = os.curdir
16 else:
17 dir = argv[1]
18 for root, directories, files in os.walk(dir):
19 if root == os.curdir:
20 directories[0:] = [
21 os.path.join('utils', 'apidoc'),
22 os.path.join('lib', 'dartdoc')
23 ]
24
25 for filename in files:
26 if filename.endswith((
27 '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt')):
28 print os.path.relpath(os.path.join(root, filename))
29
30 if __name__ == '__main__':
31 sys.exit(main(sys.argv))
OLDNEW
« utils/apidoc/apidoc.dart ('K') | « utils/apidoc/apidoc.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698