d2a79c9bdd
This half produces the JSON file by going through each of the HTML libraries and pulling out the @DomName annotations as keys for the map. This means that even though member names may change, the map still works. Currently creates a blank json file because I have not hooked up the other half that puts the docs into the libraries to begin with. Review URL: https://codereview.chromium.org//12035057 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17610 260f80e4-7a28-3924-810f-c04153c831b5
32 lines
937 B
Dart
32 lines
937 B
Dart
// 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.
|
|
|
|
/**
|
|
* This program reads the HTML libraries from [LIB_PATH] and outputs their
|
|
* documentation to [JSON_PATH].
|
|
*/
|
|
|
|
import 'dart:io';
|
|
import 'dart:async';
|
|
|
|
import '../lib/docs.dart';
|
|
|
|
final Path json_path = scriptDir.append('../docs.json').canonicalize();
|
|
final Path lib_path = scriptDir.append('../../../../sdk/').canonicalize();
|
|
|
|
main() {
|
|
print('Converting HTML docs from $lib_path to $json_path.');
|
|
|
|
var anyErrors = convert(lib_path, json_path);
|
|
|
|
print('Converted HTML docs ${anyErrors ? "with $anyErrors" : "without"}'
|
|
' errors.');
|
|
}
|
|
|
|
/**
|
|
* Gets the full path to the directory containing the entrypoint of the current
|
|
* script.
|
|
*/
|
|
Path get scriptDir =>
|
|
new Path(new Options().script).directoryPath; |