Open mgrider opened 5 years ago
(I now see the TODO list in the readme.)
Hi @mgrider, thanks for the feedback and sorry for the late delay — busy week :)
General: I haven't tried it, but does hackman g AppDelegate also work? (Would be awesome if it did. I would feel much more comfortable with using proper case for property types, especially.)
It didn't — but I just pushed an updated.
hackman generate scaffold human name is_favorite:bool phone_number:string --view=table --coordinator
and
hackman generate scaffold Human name isFavorite:Bool phoneNumber:String --view=table --coordinator
result identical results now.
After every command, I would love to see: Run git add . ; git commit -a -m "{suitable message related to what hackman command was just performed, might actually include the command.}" Also, is there any reason not to run xcodegen for them after every command?
Adding git support automatically doesn't sound bad!
About xcodegen
I was not sure, if i wanted xcodegen as a hard dependency. Currently, you can use the generators just fine without xcodegen installed on your computer.
Farther out there: I'd love to see some kind of simple (maybe yaml or json) file created for each generate command. (Or maybe just one database-like file per project, that keeps track of all the various things that are generated.) This would allow you to append to previously generated files. So instead of one long hackman g scaffold album name uuid artist:artist created_at:date updated_at:date --coordinator, you could run hackman g scaffold album then hackman a[ppend] album name then hackman a album uuid, and have it do the right thing.
I like the idea for updates -- but do you think it could be achievable without something like a .commands_history
file?
Offhand, I can imagine it working without a .commands_history
(or other metadata file) by parsing the generated file to figure out where to make the new edit. This might be helped along with the inclusion of comments at some key places, maybe?
More requests, after playing with this for a couple of days:
project setup could be interactive, and ask for the following:
pod init
fastlane init
regarding swiftlint...
swiftlint autocorrect --format
in the project folder after any hackman command, (alternatively specifying the files just created.) But of course then that's another dependency. Another option is to fix the templates, but it may be difficult to cover all cases, and is probably low bang-for-buck ratio.swiftlint
, an overview is here: https://nshipster.com/swift-format/A couple of things I noticed that should maybe be fixed:
paths
Coordinator
(not to be confused with Coordinators
) that only it uses (only when -c is specified, of course)generator requirements
ViewControllerTable
requires at least one property (or there is a compilation error).
First of all, love this project. I've been wanting to do something like this for a while now. Here's some (pretty out there) ideas for this project:
General:
hackman g AppDelegate
also work? (Would be awesome if it did. I would feel much more comfortable with using proper case for property types, especially.)On new project creation:
cd
into the directory just createdgit init
After every command, I would love to see:
git add . ; git commit -a -m "{suitable message related to what hackman command was just performed, might actually include the command.}"
xcodegen
for them after every command?Farther out there:
hackman g scaffold album name uuid artist:artist created_at:date updated_at:date --coordinator
, you could runhackman g scaffold album
thenhackman a[ppend] album name
thenhackman a album uuid
, and have it do the right thing.I might be willing to help out with this project. Do you have a TODO list somewhere already?