Skip to content

Commit e2aed4f

Browse files
authored
[code_assets] Organize examples (#2542)
This PR reorganizes the code samples for `package:code_assets`: * It adds a readme.md to the examples directory to be displayed on pub.dev * It adds readmes to the samples missing readmes. * It `.pubignore`s the examples directory except for the readme. * And adds a test verifying we're not including samples. (Compressed archive size for code-assets from 3MB -> 21KB.) * It also adds a test that certain sample files are not moved, since we want to reference them from external sources. (Also applies some of these things to the other packages.)
1 parent 6266289 commit e2aed4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+447
-17
lines changed

pkgs/code_assets/.pubignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Please keep consistent with .gitignore.
2+
3+
# https://dart.dev/guides/libraries/private-files
4+
# Created by `dart pub`
5+
.dart_tool/
6+
7+
# Avoid committing pubspec.lock for library packages; see
8+
# https://dart.dev/guides/libraries/private-files#pubspeclock.
9+
pubspec.lock
10+
11+
coverage/
12+
13+
# Additional pub ignores
14+
doc/
15+
example/*/*
16+
test_data/
17+
test/
18+
tool/
19+

pkgs/code_assets/example/README.md

Lines changed: 16 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 31 additions & 0 deletions

pkgs/code_assets/example/build/host_name/lib/src/third_party/windows.dart renamed to pkgs/code_assets/example/host_name/lib/src/third_party/windows.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// TODO
1+
// This file includes parts which are Copyright (c) 1982-1986 Regents
2+
// of the University of California. All rights reserved. The
3+
// Berkeley Software License Agreement specifies the terms and
4+
// conditions for redistribution.
25

36
// AUTO GENERATED FILE, DO NOT EDIT.
47
//

0 commit comments

Comments
 (0)