google / google/webcrypto.dart

Move dartdoc examples to separate files

Open
#283 7 comments 1 reaction 0 assignees View on GitHub
cleanup documentation good first issue help wanted
Dominant language
Dart
Stars
116
Forks
110
Avg merge
6d 8h
Merged PRs (30d)
9

Description

As of recent `dartdoc` versions it's now possible to do:
```dart
/// My documentation string...
///
/// {@example /path/to/example/file.dart}
void someMethod() { ... }
```

Doing this makes it easy to run `dart analyze` on examples and use `dart format` on examples.

I propose that we refactor the current repository layout such that we have:
```dart
example/
flutter_webcrypto_demo/
... everything that's currently in example/
webcrypto/
hmac/
import_raw_key.dart
...
/
.dart
```

And then we use `/// {@example /example/webcrypto/hmac/import_raw_key.dart}` in our API docs.

This should not land as one large PR, please do:
* [x] One PR moving `example/` to `example/flutter_webcrypto_demo/`
* One commit that moves files
* One commit that fixes CI
* Any further cleanup of names, do that in an other PR
* [ ] A PR for each primitive, so we don't have too big PRs to review

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.