Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add --init mode as proposed in SR-353 #117
swift build —initializes a new swift project with the following structure.
import PackageDescription let package = Package( name: "foo" )
where foo is the name of the working directory
maybe —create or —new would work too, but I prefer —init
the current implementation just creates a .gitignore for convenience, but we might want to discuss that
I really don't like that commands are being slapped on to
Some examples to demonstrate my point:
Create a new project
Create a new project with the name "foo"
Create a new project named foo with tests set up
These examples may seem convoluted, but they apply in other places as well.
Pull dependencies without building
Run the compiled binary
Remove build artifacts
It's not a huge deal from a user perspective, but as features are added onto SPM, it doesn't make a lot of sense to pile them into a subcommand.
Perhaps I should leave my notes elsewhere.
While I agree that the naming needs some more thought, this commit does not add much more complexity since it's independent of what