<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I like the idea. It would make people to follow the standard convention even more. And make it even simpler to create a Module.<div class=""><div class=""><div class=""><div class=""><br class=""></div></div></div><div apple-content-edited="true" class=""><div class=""><div class="">Kostiantyn</div></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 05 Dec 2015, at 22:01, Lander Brandt via swift-build-dev &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On the Swift package manager page on&nbsp;<a href="http://swift.org/" class="">swift.org</a>&nbsp;(<a href="https://swift.org/package-manager/#example-usage" class="">https://swift.org/package-manager/#example-usage</a>) 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.<div class=""><br class=""></div><div class="">Example of the tool command: `swift init foo --type=(lib|app)`</div><div class=""><br class=""></div><div class="">Would create a new directory called “foo” with the following tree structure for a project of type app:</div><div class=""><br class=""></div><div class=""><div class="">foo</div><div class="">├── Package.swift</div><div class="">├── Packages</div><div class="">├── README.md</div><div class="">└── main.swift</div></div><div class=""><br class=""></div><div class="">And for project of type lib:</div><div class=""><br class=""></div><div class=""><div class="">foo</div><div class="">├── Package.swift</div><div class="">├── README.md</div><div class="">└── Sources</div><div class="">&nbsp; &nbsp; └── Foo.swift</div></div><div class=""><br class=""></div><div class="">In both cases Package.swift would contain something basic like:</div><div class=""><br class=""></div><div class=""><div class="">import PackageDescription</div><div class=""><br class=""></div><div class="">let package = Package(</div><div class="">&nbsp; &nbsp; name: “Foo",</div><div class="">&nbsp; &nbsp; dependencies: [</div><div class="">&nbsp; &nbsp; ]</div><div class="">)</div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=n3jPUXkT5YFxadHQEoaOww8U5ADISS-2FbZlg0rksvZj7QWospiywL3oKciSRScVuZG6rox4PKtTS4tI6QiVywp44hNNgC-2FE1b26xHkuKJtqnURyjl3HaUEd2A1-2B8CwPW-2B-2BLnniCFX4GXMNF5P6pCPJrMUxrv-2B9VftyFg8Hijm-2BiCTc7VcI-2Fvo-2FUF5SkHy592VGaCfyvSNLt-2FIH1S21PcWNywD3UXiyy0kI3srlvj2hcg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-build-dev<br class=""></div></blockquote></div><br class=""></div></body></html>