Skip to content

Commit

Permalink
promote jaspr_web_compilers to non experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilian Schulte committed Jan 9, 2024
1 parent 1a0192b commit 2d4d274
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/build
6 changes: 6 additions & 0 deletions packages/jaspr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased minor

- Promoted `jaspr_web_compilers` to non-experimental status and changed cli command `jaspr create --experimental-web-compilers`
to `jaspr create --jaspr-web-compilers`
- Fixed error on windows when running `jaspr build`.

## 0.9.3

- Fixed `melos format` on Windows.
Expand Down
12 changes: 6 additions & 6 deletions packages/jaspr_cli/lib/src/commands/create_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ class CreateCommand extends BaseCommand {
allowedHelp: templateDescriptionByName,
);
argParser.addFlag(
'experimental-web-compilers',
'jaspr-web-compilers',
abbr: 'c',
help:
'Use jaspr web compilers (experimental)? This enables the use of flutter web plugins and direct flutter embedding.',
help: 'Uses jaspr_web_compilers. This enables the use of flutter web plugins and direct flutter embedding.',
defaultsTo: null,
);
}
Expand Down Expand Up @@ -76,10 +75,11 @@ class CreateCommand extends BaseCommand {

var template = templatesByName[templateName]!;

var useJasprCompilers = argResults!['experimental-web-compilers'] as bool?;
var useJasprCompilers = argResults!['jaspr-web-compilers'] as bool?;
useJasprCompilers ??= logger.logger.confirm(
'Use jaspr web compilers (experimental)? This enables the use of flutter web plugins and direct flutter embedding.',
defaultValue: true);
'Use jaspr_web_compilers? This enables the use of flutter web plugins and direct flutter embedding.',
defaultValue: false,
);

var progress = logger.logger.progress('Bootstrapping');
var generator = await MasonGenerator.fromBundle(template);
Expand Down
2 changes: 2 additions & 0 deletions packages/jaspr_cli/lib/src/helpers/flutter_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mixin FlutterHelper on BaseCommand {
var flutterProcess = await Process.start(
'flutter',
['run', '--device-id=web-server', '-t', '.dart_tool/jaspr/flutter_target.dart', '--web-port=5678'],
runInShell: true,
);

unawaited(watchProcess('flutter run', flutterProcess, tag: Tag.flutter, hide: (_) => !verbose));
Expand All @@ -29,6 +30,7 @@ mixin FlutterHelper on BaseCommand {
var flutterProcess = await Process.start(
'flutter',
['build', 'web', '-t', '.dart_tool/jaspr/flutter_target.dart', '--output=build/flutter'],
runInShell: true,
);

var target = useSSR ? 'build/jaspr/web' : 'build/jaspr';
Expand Down

0 comments on commit 2d4d274

Please sign in to comment.