Skip to content

Commit

Permalink
add tool to force re-creating web project
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Nov 20, 2024
1 parent fef6e80 commit 8731b76
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions demo_sqflite/tool/web/re_create_web_project.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:process_run/stdio.dart';

import 'setup_sqflite_web.dart';

Future<void> main(List<String> args) async {
var webDir = Directory('web');
if (webDir.existsSync()) {
await webDir.delete(recursive: true);
}
await setupWeb();
}
4 changes: 4 additions & 0 deletions demo_sqflite/tool/web/setup_sqflite_web.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import 'package:process_run/shell.dart';

Future<void> main() async {
await setupWeb();
}

Future<void> setupWeb() async {
await run('''
# Create the web project
flutter create . --platforms web
Expand Down

0 comments on commit 8731b76

Please sign in to comment.