Skip to content

Commit

Permalink
Adapt further
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Oct 23, 2023
1 parent 942803e commit a25e108
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
9 changes: 7 additions & 2 deletions pkgs/messages/example_json/build_script.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:io';

import 'package:messages/build_files.dart';
import 'package:native_assets_cli/build_files_code.dart';
import 'package:data_assets_cli/build_files_data.dart';
import 'package:path/path.dart' as path;

Future<void> main(List<String> args) async {
Expand All @@ -17,5 +18,9 @@ Future<void> main(List<String> args) async {
.toList(),
};

print(BuildOutput(filesPerPackage: filesPerPackage).toJson());
final buildOutput = [
CodeBuildOutput(filesPerPackage: filesPerPackage).toJson(),
DataBuildOutput(filesPerPackage: filesPerPackage).toJson(),
];
print(buildOutput);
}
10 changes: 2 additions & 8 deletions pkgs/messages/example_json/lib/testarbctx2.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@ class AboutPageMessages {

@pragma('dart2js:tryInline')
Future<String> aboutMessage({required String websitename}) async {
return await generate(
bundle,
[websitename],
currentLocale,
intlObject,
1,
);
return await generate(bundle, [websitename], currentLocale, intlObject, 1);
}

@Resource('messages')
@ResourceIdentifier('package:messages')
@pragma('dart2js:resource-identifier')
@pragma('dart2js:never-inline')
static Future<String> generate(MessagesAssetBundle bundle, List args,
Expand Down
1 change: 1 addition & 0 deletions pkgs/messages/example_json/out.js.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"name": "generate",
"uri": "file:///home/mosum/projects/i18n/pkgs/messages/example_json/lib/testarbctx2.g.dart",
"nonconstant": true,
"id": "AboutPage",
"files": [
{
"filename": "out.js",
Expand Down
6 changes: 0 additions & 6 deletions pkgs/messages/lib/src/message_list_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,3 @@ class MessageListJson extends MessageList {
) =>
message.generateString(args, intl: intl);
}

const ResourceIdentifier resourceIdentifier = ResourceIdentifier();

class ResourceIdentifier {
const ResourceIdentifier();
}

0 comments on commit a25e108

Please sign in to comment.