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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« utils/apidoc/apidoc.gyp ('K') | « utils/apidoc/scripts/list_files.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/scripts/list_files.py
diff --git a/utils/apidoc/scripts/list_files.py b/utils/apidoc/scripts/list_files.py
new file mode 100644
index 0000000000000000000000000000000000000000..836bb03a8d56f1b0168e2780b73fb4dc6baf42d0
--- /dev/null
+++ b/utils/apidoc/scripts/list_files.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Traverses apidoc and dartdoc and lists all possible input files that are
+# used when building API documentation. Used by gyp to determine when apidocs
+# need to be regenerated (see `apidoc.gyp`).
+
+# 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
+# (which is when this script is invoked by gyp) by using the prebuild dart in
+# tools/testing/bin.
+
+import os
+import sys
+
+def main(argv):
+ if len(argv) == 1:
+ dir = os.curdir
+ else:
+ dir = argv[1]
+ for root, directories, files in os.walk(dir):
+ if root == os.curdir:
+ directories[0:] = [
+ os.path.join('utils', 'apidoc'),
+ os.path.join('lib', 'dartdoc')
+ ]
+
+ for filename in files:
+ if filename.endswith((
+ '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt')):
+ print os.path.relpath(os.path.join(root, filename))
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« 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