Skip to content

Commit 3b52a74

Browse files
authored
Update for repo best practices (flutter#14)
- Use `pub.dev` links over `dardocs.org`. - In example, follow `package:pedantic` style for function typed argument. - Drop unused author field from pubspec. - Use a simpler constraint on `package:meta` since the SDK constraint already prevents us from picking up older versions.
1 parent a288ff9 commit 3b52a74

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.travis.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ dart:
55
- 2.1.1
66

77
dart_task:
8-
- test
8+
- test: -p vm,chrome
99

1010
matrix:
1111
include:
12-
- dart: dev
13-
dart_task: dartanalyzer
1412
- dart: dev
1513
dart_task: dartfmt
14+
- dart: dev
15+
dart_task:
16+
dartanalyzer: --fatal-lints --fatal-warnings .
17+
- dart: 2.1.1
18+
dart_task:
19+
dartanalyzer: --fatal-warnings .
1620

1721
# Only building master means that we don't run two builds for each pull request.
1822
branches:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Different `Clock`s can have a different notion of the current time, and the
44
default top-level [`clock`][]'s notion can be swapped out to reliably test
55
timing-dependent code.
66

7-
[`Clock`]: https://www.dartdocs.org/documentation/clock/latest/clock/Clock-class.html
8-
[`clock`]: https://www.dartdocs.org/documentation/clock/latest/clock/clock.html
7+
[`Clock`]: https://pub.dev/documentation/clock/latest/clock/Clock-class.html
8+
[`clock`]: https://pub.dev/documentation/clock/latest/clock/clock.html
99

1010
For example, you can use `clock` in your libraries like this:
1111

@@ -14,7 +14,7 @@ For example, you can use `clock` in your libraries like this:
1414
import 'package:clock/clock.dart';
1515
1616
/// Runs [callback] and prints how long it took.
17-
T runWithTiming<T>(T callback()) {
17+
T runWithTiming<T>(T Function() callback) {
1818
var stopwatch = clock.stopwatch()..start();
1919
var result = callback();
2020
print('It took ${stopwatch.elapsed}!');

pubspec.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: clock
22
version: 1.0.2-dev
33
description: A fakeable wrapper for dart:core clock APIs
4-
author: Dart Team <[email protected]>
54
homepage: https://github.com/dart-lang/clock
65

76
environment:
87
sdk: '>=2.1.1 <3.0.0'
98

109
dependencies:
11-
meta: '>=0.9.0 <2.0.0'
10+
meta: ^1.0.0
1211

1312
dev_dependencies:
1413
test: ^1.0.0

test/stopwatch_test.dart

+2
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,7 @@ void main() {
165165
});
166166
});
167167
});
168+
}, onPlatform: {
169+
'js': const Skip('Web does not have enough precision'),
168170
});
169171
}

0 commit comments

Comments
 (0)