Skip to content

Commit f74d660

Browse files
committed
Add a playground
1 parent 0ce1c0e commit f74d660

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Commander
2+
3+
let group = Group {
4+
$0.command("login") { (username:String) in
5+
print("You are now logged in \(username).")
6+
}
7+
8+
$0.command("logout") {
9+
print("You are not logged out.")
10+
}
11+
}
12+
13+
group.run([])
14+
group.run(["login", "kyle"])
15+
group.run(["logout"])
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<playground version='5.0' target-platform='osx' requires-full-environment='true' display-mode='raw'>
3+
<timeline fileName='timeline.xctimeline'/>
4+
</playground>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Timeline
3+
version = "3.0">
4+
<TimelineItems>
5+
</TimelineItems>
6+
</Timeline>

Commander.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
279256B31BB3260D00E66B9E /* Group.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Group.swift; sourceTree = "<group>"; };
4747
279256B51BB32A8E00E66B9E /* ArgumentConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArgumentConvertible.swift; sourceTree = "<group>"; };
4848
279256B71BB32B3F00E66B9E /* ArgumentConvertibleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArgumentConvertibleTests.swift; sourceTree = "<group>"; };
49+
279256B91BB32E4200E66B9E /* Commander.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Commander.playground; sourceTree = "<group>"; };
4950
27B1A0FE1BACD69500B1260F /* ArgumentParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArgumentParserTests.swift; sourceTree = "<group>"; };
5051
/* End PBXFileReference section */
5152

@@ -71,6 +72,7 @@
7172
2768A2161BACC38C00F994EE = {
7273
isa = PBXGroup;
7374
children = (
75+
279256B91BB32E4200E66B9E /* Commander.playground */,
7476
2768A2221BACC38C00F994EE /* Commander */,
7577
2768A22E1BACC38C00F994EE /* CommanderTests */,
7678
2768A2211BACC38C00F994EE /* Products */,

0 commit comments

Comments
 (0)