From f719cea791ed81ed6a44c28638d51dc3e3e68f4a Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Fri, 19 Jun 2026 21:59:45 +1000 Subject: [PATCH 1/5] Update the README file --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 5adc5037..cd6bb1a3 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,22 @@ flutter pub global activate solidpod solidpod create my_pod_app ``` +For Windows users, command `solidpod` can be added to the system by the +following steps: + +- Run **PowerShell** +- Run the following commands: +```shell +$pubCacheBin = "$env:LOCALAPPDATA\Pub\Cache\bin" +$userPath = [Environment]::GetEnvironmentVariable("Path", "User") + +if ($userPath -notlike "*$pubCacheBin*") { + [Environment]::SetEnvironmentVariable("Path", "$userPath;$pubCacheBin", "User") +} +``` +- Close **Powershell** +- Open **Command Prompter** or **PowerShell** and use `solidpod` command. + The generator runs `flutter create` to lay down the platform folders, overlays the template (substituting your app name), and runs `flutter pub get`. Useful options: From c1555e789772d150e8b49c72e845164a62850f6d Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Fri, 19 Jun 2026 23:28:24 +1000 Subject: [PATCH 2/5] Fix the pubspec.yaml file isuue --- .pubignore | 2 ++ README.md | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.pubignore b/.pubignore index a7371d3c..9bf863b4 100644 --- a/.pubignore +++ b/.pubignore @@ -15,6 +15,8 @@ ARCHIVE ignore pubspec.yaml.* +!templates/solidpod/pubspec.yaml.tmpl + .flutter-plugins* qtest_*.txt diff --git a/README.md b/README.md index cd6bb1a3..7792212d 100644 --- a/README.md +++ b/README.md @@ -101,19 +101,53 @@ of a `flutter create --template=solidpod`, which stock Flutter cannot offer because the `--template` flag only accepts a fixed set of built-in types. We provide a small generator instead. -From any checkout that depends on `solidpod`: +The recommended way is to activate the generator once and then run it from any +directory: ```bash -dart run solidpod:create my_pod_app +flutter pub global activate solidpod +solidpod create my_pod_app ``` -Or activate it once and use it anywhere: +Alternatively, `dart run solidpod:create` works **only from within a package +that already depends on `solidpod`** (for example a clone of the `solidpod` +repository), because `dart run` must resolve the `solidpod:create` executable +through that project's `pubspec.yaml`: ```bash -flutter pub global activate solidpod -solidpod create my_pod_app +dart run solidpod:create my_pod_app ``` +Running `dart run solidpod:create` from an unrelated directory fails with +`Found no pubspec.yaml file in or parent directories` — use the global +activation above instead. + +### Running from a local checkout (before publishing) + +If you are working on a branch of `solidpod` that is not yet published to +pub.dev, you can still generate an app from any directory without publishing. +Replace `/path/to/solidpod` below with the path to your local checkout. + +- Run the generator script directly. This always uses your current working tree + — both `bin/create.dart` and the template files — so it picks up your edits + on every run: + + ```bash + dart run /path/to/solidpod/bin/create.dart my_pod_app + ``` + +- Or activate the local checkout and use the short `solidpod create` command + anywhere: + + ```bash + flutter pub global activate --source path /path/to/solidpod + solidpod create my_pod_app + ``` + + Note that this takes a snapshot of `bin/create.dart`, so re-run the + `activate` command after editing the generator itself; edits to the template + files are picked up without re-activating. + For Windows users, command `solidpod` can be added to the system by the following steps: From 336cb2dca2923dc49bbfcb306b02a4b41bf67667 Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Sat, 20 Jun 2026 00:13:44 +1000 Subject: [PATCH 3/5] Lint --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7792212d..5bbc2fe7 100644 --- a/README.md +++ b/README.md @@ -148,19 +148,21 @@ Replace `/path/to/solidpod` below with the path to your local checkout. `activate` command after editing the generator itself; edits to the template files are picked up without re-activating. -For Windows users, command `solidpod` can be added to the system by the +For Windows users, command `solidpod` can be added to the system by the following steps: - Run **PowerShell** - Run the following commands: -```shell -$pubCacheBin = "$env:LOCALAPPDATA\Pub\Cache\bin" -$userPath = [Environment]::GetEnvironmentVariable("Path", "User") -if ($userPath -notlike "*$pubCacheBin*") { - [Environment]::SetEnvironmentVariable("Path", "$userPath;$pubCacheBin", "User") -} -``` + ```shell + $pubCacheBin = "$env:LOCALAPPDATA\Pub\Cache\bin" + $userPath = [Environment]::GetEnvironmentVariable("Path", "User") + + if ($userPath -notlike "*$pubCacheBin*") { + [Environment]::SetEnvironmentVariable("Path", "$userPath;$pubCacheBin", "User") + } + ``` + - Close **Powershell** - Open **Command Prompter** or **PowerShell** and use `solidpod` command. From 32565e20b7ed60b590ca963820a4a28b7da6e8cb Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Sat, 20 Jun 2026 00:14:57 +1000 Subject: [PATCH 4/5] Lint --- .lycheeignore | 2 ++ bin/create.dart | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.lycheeignore b/.lycheeignore index deaae03e..0027b2f4 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -84,6 +84,8 @@ https://securetoken.google.com/ file:///home/runner/work/solidui/solidui/lib/src/utils/scheme https://pods.example.au/john-doe/profile/card#me https://github.com/gjwgit/myapp/blob/main/README.md +https://github.com/anusii/solidpod/blob/main/solidpodeg/README.md +https://server/POD_NAME/APP_NAME/data/FILE_PATH # 20260605 gjw Failing solid servers diff --git a/bin/create.dart b/bin/create.dart index 7e5e9278..5cf8486b 100644 --- a/bin/create.dart +++ b/bin/create.dart @@ -170,7 +170,8 @@ Future main(List arguments) async { await _runProcess('flutter', ['pub', 'get'], outputDir.path); } - _printNextSteps(stdout, outputDir.path, runFlutterCreate: args.runFlutterCreate); + _printNextSteps(stdout, outputDir.path, + runFlutterCreate: args.runFlutterCreate); } // ── Template rendering ───────────────────────────────────────────────────── @@ -284,7 +285,8 @@ void _patchAndroidRedirectScheme(Directory output, String scheme) { if (content.contains(placeholder)) return; final patched = content.replaceFirstMapped( RegExp(r'versionName flutterVersionName\n'), - (m) => '${m[0]} manifestPlaceholders = [$placeholder: "$scheme"]\n', + (m) => + '${m[0]} manifestPlaceholders = [$placeholder: "$scheme"]\n', ); if (patched != content) { groovy.writeAsStringSync(patched); @@ -403,7 +405,8 @@ Future _runProcess( ); final code = await process.exitCode; if (code != 0) { - stderr.writeln('Error: `$executable ${args.join(' ')}` exited with $code.'); + stderr + .writeln('Error: `$executable ${args.join(' ')}` exited with $code.'); return false; } return true; @@ -563,7 +566,8 @@ Example: '''); } -void _printNextSteps(IOSink out, String path, {required bool runFlutterCreate}) { +void _printNextSteps(IOSink out, String path, + {required bool runFlutterCreate}) { out.writeln(''' Done! Your Solid Pod app is ready in $path/ From 7ef4e3f6b46fe804c1ebddc3d2b94ab52dd870eb Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Sat, 20 Jun 2026 00:22:16 +1000 Subject: [PATCH 5/5] Lint --- bin/create.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/create.dart b/bin/create.dart index 5cf8486b..6261fbc3 100644 --- a/bin/create.dart +++ b/bin/create.dart @@ -170,8 +170,11 @@ Future main(List arguments) async { await _runProcess('flutter', ['pub', 'get'], outputDir.path); } - _printNextSteps(stdout, outputDir.path, - runFlutterCreate: args.runFlutterCreate); + _printNextSteps( + stdout, + outputDir.path, + runFlutterCreate: args.runFlutterCreate, + ); } // ── Template rendering ───────────────────────────────────────────────────── @@ -566,8 +569,11 @@ Example: '''); } -void _printNextSteps(IOSink out, String path, - {required bool runFlutterCreate}) { +void _printNextSteps( + IOSink out, + String path, { + required bool runFlutterCreate, +}) { out.writeln(''' Done! Your Solid Pod app is ready in $path/