-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Workiva/health_and_maintenance
CPLAT-7724 Address health and maintenance suggestions from pub.dev
- Loading branch information
Showing
19 changed files
with
153 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
## 1.0.2 | ||
|
||
- Fix #8. | ||
|
||
- Address pub health/maintenance recommendations (add an example, add missing | ||
doc comments). | ||
|
||
## 1.0.1 | ||
|
||
- Update package metadata in `pubspec.yaml`. | ||
|
||
## 1.0.0 | ||
|
||
- Initial version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Contributing | ||
|
||
- `dartanalyzer .` | ||
- `dartfmt -w .` | ||
- `pub run test` | ||
|
||
If you make changes to `lib/src/config.dart` and need to regenerate | ||
`lib/src/config.g.dart`: | ||
|
||
1. Uncomment the `json_serializable: ^3.0.0` dev dependency in `pubspec.yaml` | ||
1. Comment out the entirety of `build.yaml` | ||
1. `pub get && pub run build_runner build` | ||
|
||
This is necessary because a builder cannot depend on code that is generated by | ||
another builder in the same package. An alternative solution would be to define | ||
the `TestHtmlBuilderConfig` in a separate package, but this is simpler for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Example | ||
|
||
The [`project/` directory][project] contains an example project that consumes | ||
this `test_html_builder`. You should be able to run tests in this directory via | ||
`pub run build_runner test` and have them all pass. | ||
|
||
[project]: project/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
targets: | ||
$default: | ||
builders: | ||
test_html_builder: | ||
options: | ||
templates: | ||
"test/script_template.html": | ||
- "test/script_test.dart" | ||
"test/css_template.html": | ||
- "test/css_test.dart" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
platforms: | ||
- chrome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
window.custom = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: test_html_builder_example_project | ||
version: 0.0.0 | ||
|
||
dev_dependencies: | ||
build_runner: ^1.7.1 | ||
build_test: ^0.10.9 | ||
build_web_compilers: ^2.6.3 | ||
test: ^1.8.0 | ||
test_html_builder: ^1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="packages/test_html_builder_example_project/style.css"></script> | ||
{test} | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@TestOn('browser') | ||
import 'dart:html'; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('css is loaded', () { | ||
expect(document.head.querySelector('link'), isNotNull); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html> | ||
<head> | ||
<link rel="x-dart-test" href="custom_html_test.dart"> | ||
<script src="packages/test/dart.js"></script> | ||
</head> | ||
<body id="custom"></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@TestOn('browser') | ||
import 'dart:html'; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('custom ID', () { | ||
expect(document.body.id, 'custom'); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('passes', () { | ||
expect(true, isTrue); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html> | ||
<head> | ||
<script src="packages/test_html_builder_example_project/script.js"></script> | ||
{test} | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@TestOn('browser') | ||
import 'dart:js'; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('js is loaded', () { | ||
expect(context['custom'], isTrue); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters