[swift-build-dev] Project init command

Lander Brandt landerbrandt at gmail.com
Sat Dec 5 15:01:58 CST 2015


On the Swift package manager page on swift.org <http://swift.org/> (https://swift.org/package-manager/#example-usage <https://swift.org/package-manager/#example-usage>) the requirements for creating a package/application are clearly outlined, but why not include a command in the swift tool for autogenerating the require? I did a quick look and didn’t see any existing discussion, so I apologize if this has already been discussed.

Example of the tool command: `swift init foo --type=(lib|app)`

Would create a new directory called “foo” with the following tree structure for a project of type app:

foo
├── Package.swift
├── Packages
├── README.md
└── main.swift

And for project of type lib:

foo
├── Package.swift
├── README.md
└── Sources
    └── Foo.swift

In both cases Package.swift would contain something basic like:

import PackageDescription

let package = Package(
    name: “Foo",
    dependencies: [
    ]
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20151205/a23b758a/attachment.html>


More information about the swift-build-dev mailing list