swift tool project init command


(Lander Brandt) #1

On the Swift package manager page on swift.org <http://swift.org/> (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: [
    ]
)


(Jacopo Andrea Giola) #2

+1 to this, but I'm not sure that this mailing list is the right place to discuss evolution of the package manager.
I think you can directly send a pull request to the repository to be evaluated.

···

Sent from my iPad

On 05 Dec 2015, at 21:25, Lander Brandt via swift-evolution <swift-evolution@swift.org> wrote:

On the Swift package manager page on swift.org (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: [
    ]
)

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution