Files
GitJournal/scripts/setup_env.dart
Vishesh Handa 42d6386096 Add basic txt file support
With this 'txt' files are now read and written. However, they don't have
any metadata so they don't show up correctly in the sort order and
currently the Markdown Editor is still available for them.

Related to #55
2020-06-02 00:15:18 +02:00

14 lines
338 B
Dart

import 'dart:convert';
import 'dart:io';
Future<void> main() async {
final config = {
'sentry': Platform.environment['SENTRY_DSN'],
'revenueCat': Platform.environment['REVENUE_CAT_API_KEY'],
};
final filename = 'lib/.env.dart';
await File(filename)
.writeAsString('final environment = ${json.encode(config)};');
}