I've just used gist generate for the first time, and it worked great! I was especially happy to see that I could easily update the gist in place.
I accidentally used gist generate from the wrong directory (inside of web), and got no output at all. Instead, I'd like to see a message like this:
Found no apps to convert: No subdirectories contain a web directory.
I think it might be nice to be able to generate a gist from the app's root directory, rather than a directory above, in case you have a github repo with only one sample, or you're really not ready to regenerate some other samples in the repo. If you support this case, you'd need to adjust the error messages accordingly.
Here, in case you're curious, is a transcript of what I did:
$ gist generate
...
Skipping web_app: Too many files.
$ ls web_app/web
packages@ web_app.dart web_app.html
$ rm web_app/web/packages
$ gist generate
...
Skipping web_app: Files can only have the name index.html/main.dart/styles.css.
$ cd web_app/web
$ git mv web_app.dart main.dart
$ git mv web_app.html index.html
$ vim index.html
$ gist generate
...
(silently fails)
$
$ cd ../..
$ gist generate
...
"web_app" gist created at https://gist.github.com/cfeea02a02048cead535
Homepage inserted in pubspec.yaml
$
I've just used
gist generate
for the first time, and it worked great! I was especially happy to see that I could easily update the gist in place.I accidentally used
gist generate
from the wrong directory (inside of web), and got no output at all. Instead, I'd like to see a message like this:Found no apps to convert: No subdirectories contain a
web
directory.I think it might be nice to be able to generate a gist from the app's root directory, rather than a directory above, in case you have a github repo with only one sample, or you're really not ready to regenerate some other samples in the repo. If you support this case, you'd need to adjust the error messages accordingly.
Here, in case you're curious, is a transcript of what I did: