Skip to content

Commit

Permalink
Prepare 0.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Mar 18, 2022
1 parent 58f5bb3 commit 83fcf74
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 12 deletions.
7 changes: 7 additions & 0 deletions docs/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ builders:
import: 'tool/index_examples.dart'
builder_factories: ["IndexExamples.new"]
build_extensions: {'.dart': ['json']}
extract_versions:
build_to: cache
import: 'tool/write_versions.dart'
builder_factories: ["WriteVersions.new"]
build_extensions: {'pubspec.yaml': ['lib/src/getting_started/versions.dart']}

targets:
$default:
Expand All @@ -23,6 +28,8 @@ targets:
enabled: false
"|index_samples":
enabled: true
"|extract_versions":
enabled: true

global_options:
build_web_compilers|entrypoint:
Expand Down
11 changes: 4 additions & 7 deletions docs/lib/src/getting_started/template.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:html';

import 'package:tar/tar.dart';
import 'versions.dart' as v;

void downloadExample(String packageName) {
late List<int> tarFile;
Expand Down Expand Up @@ -82,21 +83,17 @@ environment:
sdk: ^2.16.0
dependencies:
zap:
hosted: https://simonbinder.eu
version: ^0.1.0
zap: ^${v.zap}
riverpod_zap:
hosted: https://simonbinder.eu
version: ^0.1.0
version: ^${v.riverpod_zap}
dev_dependencies:
build_runner: ^2.1.7
build_web_compilers: ^3.2.2
lints: ^1.0.1
webdev: ^2.7.8
zap_dev:
hosted: https://simonbinder.eu
version: ^0.1.0
zap_dev: ^${v.zap_dev}
''',
);
}
Expand Down
1 change: 1 addition & 0 deletions docs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dev_dependencies:
build: ^2.2.1
build_runner: ^2.1.7
build_web_compilers: ^3.2.2
pubspec_parse: ^1.2.0
webdev: ^2.7.8
zap_dev:
built_site:
Expand Down
30 changes: 30 additions & 0 deletions docs/tool/write_versions.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:build/build.dart';
import 'package:pubspec_parse/pubspec_parse.dart';

class WriteVersions implements Builder {
WriteVersions(BuilderOptions _);

@override
Map<String, List<String>> get buildExtensions => const {
'pubspec.yaml': ['lib/src/getting_started/versions.dart'],
};

Future<void> build(BuildStep step) async {
const packages = [
'zap',
'riverpod_zap',
'zap_dev',
];

final buffer = StringBuffer();

for (final package in packages) {
final pubspec = Pubspec.parse(
await step.readAsString(AssetId(package, 'pubspec.yaml')));

buffer.write("const $package = '${pubspec.version.toString()}';");
}

await step.writeAsString(step.allowedOutputs.single, buffer.toString());
}
}
6 changes: 6 additions & 0 deletions zap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.0

- Fix resolving context around subcomponents.
- Improvements and performance optimizations in generated code.
- `watch()` is now supported everywhere in a component!

## 0.1.0

- Initial release!
4 changes: 2 additions & 2 deletions zap/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: zap
description: A reactive web framework built on Dart.
version: 0.1.0
description: Zap is a reactive web framework built on Dart. By compiling HTML-like files to Dart components, Zap makes it easy to write efficient web apps.
version: 0.2.0
homepage: https://simonbinder.eu/zap/

environment:
Expand Down
3 changes: 2 additions & 1 deletion zap_dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 0.1.2-dev
## 0.2.0

- Members defined in a `<script context="module">` tag are now visible to
components importing the file containing the script.
- Add an experimental linter with `dart run zap_dev analyze`

## 0.1.1

Expand Down
5 changes: 3 additions & 2 deletions zap_dev/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: zap_dev
description: Developer tooling for `zap`, a reactive web framework.
version: 0.1.1
version: 0.2.0
homepage: https://simonbinder.eu/zap/

environment:
Expand All @@ -23,7 +23,8 @@ dependencies:
sass: ^1.49.7
source_span: ^1.8.1
stack_trace: ^1.10.0
zap: ^0.1.0
watcher: ^1.0.1
zap: ^0.2.0

dev_dependencies:
build_runner: ^2.1.7
Expand Down

0 comments on commit 83fcf74

Please sign in to comment.