mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-06 15:21:21 +08:00

Platform from dart:io cannot be used on the web for reasons. And this way we get a fake File/Directory class which we can use for atleast running the web version, even if it won't work.
15 lines
317 B
Dart
Executable File
15 lines
317 B
Dart
Executable File
#!/usr/bin/env dart
|
|
|
|
import 'dart:convert';
|
|
import 'package:universal_io/io.dart';
|
|
|
|
Future<void> main() async {
|
|
final config = {
|
|
'sentry': Platform.environment['SENTRY_DSN'],
|
|
};
|
|
|
|
final filename = 'lib/.env.dart';
|
|
await File(filename)
|
|
.writeAsString('final environment = ${json.encode(config)};');
|
|
}
|