Skip to content

Commit df8edc1

Browse files
committed
Merge pull request #32 from dart-lang/devoncarew_ws2
some whitespace changes
2 parents 3e1acf0 + d6499ba commit df8edc1

File tree

11 files changed

+23
-25
lines changed

11 files changed

+23
-25
lines changed

bin/dartdoc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
library dartdoc.bin;
6+
57
import 'dart:io';
68

79
import 'package:args/args.dart';

lib/src/css.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library css;
5+
library dartdoc.css;
66

7-
import 'dart:io';
87
import 'dart:convert';
8+
import 'dart:io';
99

1010
class CSS {
1111

lib/src/generator.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class HtmlGenerator {
139139

140140
List<Variable> variables = library.getVariables();
141141
List<Accessor> accessors = library.getAccessors();
142-
List<Fnction> functions = library.getFunctions();
142+
List<ModelFunction> functions = library.getFunctions();
143143
List<Typedef> typedefs = library.getTypedefs();
144144
List<Class> types = library.getTypes();
145145

@@ -245,7 +245,6 @@ class HtmlGenerator {
245245
generateElements(cls.getMethods(), false);
246246
}
247247

248-
249248
void printComments(ModelElement e, [bool indent = true]) {
250249
String comments = e.getDocumentation();
251250
if (comments != null) {
@@ -263,7 +262,6 @@ class HtmlGenerator {
263262
}
264263
}
265264

266-
267265
void generateElements(List<ModelElement> elements, [bool header = true]) {
268266
if (!elements.isEmpty) {
269267
html.tag('h4', contents: elements[0].typeName);
@@ -446,7 +444,6 @@ String _getFileNameFor(Library library) {
446444
return '${library.name}.html';
447445
}
448446

449-
450447
class HtmlGeneratorHelper extends Helper {
451448

452449
Package package;
@@ -482,7 +479,7 @@ class HtmlGeneratorHelper extends Helper {
482479
} else {
483480
String append = '';
484481

485-
if (appendParens && (e is Method || e is Fnction)) {
482+
if (appendParens && (e is Method || e is ModelFunction)) {
486483
append = '()';
487484
}
488485
return "<a href=${createHrefFor(e)}>${htmlEscape(e.name)}$append</a>";

lib/src/html_gen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library html_gen;
5+
library dartdoc.html_gen;
66

77
class HtmlHelper {
88
StringBuffer buffer = new StringBuffer();

lib/src/io_utils.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ List<String> findFilesToDocumentInPackage(String packageDir) {
8383
// TODO(janicejl): Remove when Issue(12406) is resolved.
8484
var contents = new File(lib).readAsStringSync();
8585

86-
8786
if (contents.contains(new RegExp('\npart of ')) ||
8887
contents.startsWith(new RegExp('part of '))) {
8988
// logger.warning('Skipping part "$lib". '

lib/src/model.dart

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract class ModelElement {
2424
return new Class(e, library);
2525
}
2626
if (e is FunctionElement) {
27-
return new Fnction(e, library);
27+
return new ModelFunction(e, library);
2828
}
2929
if (e is FunctionTypeAliasElement) {
3030
return new Typedef(e, library);
@@ -259,7 +259,7 @@ class Library extends ModelElement {
259259
return elements.map((e) => new Typedef(e, this)).toList();
260260
}
261261

262-
List<Fnction> getFunctions() {
262+
List<ModelFunction> getFunctions() {
263263
List<FunctionElement> elements = [];
264264
elements.addAll(_library.definingCompilationUnit.functions);
265265
for (CompilationUnitElement cu in _library.parts) {
@@ -268,7 +268,7 @@ class Library extends ModelElement {
268268
elements
269269
..removeWhere(isPrivate)
270270
..sort(elementCompare);
271-
return elements.map((e) => new Fnction(e, this)).toList();
271+
return elements.map((e) => new ModelFunction(e, this)).toList();
272272
}
273273

274274
List<Class> getTypes() {
@@ -340,10 +340,9 @@ class Class extends ModelElement {
340340
}
341341
}
342342

343+
class ModelFunction extends ModelElement {
343344

344-
class Fnction extends ModelElement {
345-
346-
Fnction(FunctionElement element, Library library) : super(element, library);
345+
ModelFunction(FunctionElement element, Library library) : super(element, library);
347346

348347
FunctionElement get _func => (element as FunctionElement);
349348

@@ -368,7 +367,6 @@ class Fnction extends ModelElement {
368367
}
369368
}
370369

371-
372370
class Typedef extends ModelElement {
373371

374372
FunctionTypeAliasElement get _typedef => (element as FunctionTypeAliasElement);
@@ -458,7 +456,6 @@ class Constructor extends ModelElement {
458456
}
459457
}
460458

461-
462459
class Method extends ModelElement {
463460
// MethodElement get _method => (element as MethodElement);
464461

@@ -570,7 +567,6 @@ class ElementType {
570567
List<ElementType> get typeArguments => (_type as ParameterizedType).typeArguments.map((f) => new ElementType(f, library)).toList();
571568
}
572569

573-
574570
abstract class Helper {
575571
String createLinkedName(ModelElement e, [bool appendParens = false]);
576572
String createLinkedReturnTypeName(ElementType type);

lib/src/model_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library model_utils;
5+
library dartdoc.model_utils;
66

77
import 'package:analyzer/src/generated/constant.dart';
88
import 'package:analyzer/src/generated/element.dart';

lib/src/package_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Map _getPubspec(String directoryName) {
2222

2323
String getPackageDescription(String directoryName) =>
2424
_getPubspec(directoryName)['description'];
25-
25+
2626
String getPackageVersion(String directoryName) =>
2727
_getPubspec(directoryName)['version'];

pubspec.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ version: 0.0.1
33
author: Dart Team <[email protected]>
44
description: A documentation generator for Dart.
55
homepage: https://github.com/dart-lang/dartdoc
6+
67
dependencies:
78
analyzer: any
89
args: any
910
bootstrap: any
1011
logging: any
1112
mustache4dart: '>= 1.0.0 < 2.0.0'
1213
path: any
13-
unittest: any
1414
yaml: any
15+
16+
dev_dependencies:
17+
unittest: any
18+
1519
executables:
1620
dartdoc: null

templates/sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
{{#links}}
44
<url>
55
<loc>{{url}}/{{name}}</loc>

0 commit comments

Comments
 (0)