Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup improvements #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Setup improvements #7

wants to merge 3 commits into from

Conversation

aChase55
Copy link

@aChase55 aChase55 commented Aug 23, 2019

I've added a few things here:

  • An Xcode project generated from swift package generate-xcodeproj to make development within Xcode easier. I'm not entirely familiar with the mechanics of swift package manager, and it may be more useful/efficient to add this to the readme for those looking to further develop the project.

  • A bash runner, sourced from https://github.com/Meniny/Bash/blob/master/Bash/Bash.swift to execute commands such as cd and xcodegen instead of printing out instructions

  • A setup argument for the new command to simplify creating a runnable project

  • Adding xcodegen commands to the end of scaffolding commands to regenerate the project after adding new scaffolds.

Personally, I've found these additions useful, but feel free to disregard and close this PR if it is not in alignment with the vision/UX you have for this project. If you'd like these features to be more discrete, I'd be happy to separate things into multiple PRs. Additionally, if you would like to add these features, I'd be happy to update the readme as well. Regardless, I think this is a cool project and could see it being useful with continued development. Thanks for the work you've done so far!

@Cosmo
Copy link
Owner

Cosmo commented Aug 26, 2019

@aChase55 busy week, sorry for the delay!
I checked out your pull request. first of all, thanks! :D

Setup

I like the idea of the "setup" -- friends also told me that something like that would be useful, as people tend to do the same stuff over and over again.
Maybe as hackman new APP_NAME --setup or hackman new APP_NAME --starter? That way it's more clear that it is an optional thing.
What does not work, is the "--coordinator" flag for the app_delegate.
I tried hackman new AwesomeApp setup --coordinator.

There are several ways to fix it — my preferred way would be to call the generators via Swift/Code. But that requires that the generators know where the project path is (without changing the directory).
I think that can be solved with a new flag (like --source=PATH) that I can add in a new version.
That would also help for future versions of hackman where a user could tell the generator what platforms he wants to support.

Another way could be to have another generator.
hackman g starter

What do you think?

Bash.swift dependency

I think Bash.swift is a bit too much for what it is used for. I would rather have not more code to maintain 🤔

Xcode-Project

Swift Package Manager Projects work by drag and dropping the project-folder from the Finder onto Xcode.
Xcode will resolve the dependencies automatically.
What do I need to do, in order to make the project work in Xcode?

I get this error when I try to build with Xcode:

error: Build input file cannot be found: '/Users/devran/Projects/Swift/HackMan-Forks/aChase55/HackMan/.build/checkouts/PathKit/Sources/PathKit.swift' (in target 'PathKit' from project 'HackMan')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants