File tree 4 files changed +37
-17
lines changed
4 files changed +37
-17
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
2
+ /.build
3
+ /Packages
4
+ /* .xcodeproj
5
+ xcuserdata /
6
+ /.swiftpm
7
+ Package.resolved
Original file line number Diff line number Diff line change
1
+ // swift-tools-version:5.1
2
+
3
+ import PackageDescription
4
+
5
+ let package = Package (
6
+ name: " XcodeTheme " ,
7
+ dependencies: [
8
+ . package ( url: " https://github.com/JohnSundell/Files.git " , from: " 4.0.0 " ) ,
9
+ . package ( url: " https://github.com/JohnSundell/ShellOut.git " , from: " 2.0.0 " )
10
+ ] ,
11
+ targets: [
12
+ . target( name: " XcodeTheme " , dependencies: [ " Files " , " ShellOut " ] )
13
+ ]
14
+ )
Original file line number Diff line number Diff line change @@ -4,20 +4,21 @@ This repository contains the Xcode theme that I use. Feel free to use it or modi
4
4
5
5
![ ] ( Preview.png )
6
6
7
- ## Installing using Marathon
7
+ ## Installing using Swift Package Manager
8
8
9
- The easiest way to install this Xcode theme is using ** [ Marathon ] ( https://github.com/johnsundell/marathon ) : **
9
+ The easiest way to install this Xcode theme is to clone this repo and execute ` swift run ` :
10
10
11
- 1 . Install the latest version of Marathon if you haven't already:
12
11
```
13
- $ git clone https://github.com/JohnSundell/Marathon .git
14
- $ cd Marathon
15
- $ make
12
+ $ git clone https://github.com/johnsundell/xcodetheme .git
13
+ $ cd XcodeTheme
14
+ $ swift run
16
15
```
17
16
18
- 2 . Run the install script which will install [ Adobe's Source Code Pro] ( https://github.com/adobe-fonts/source-code-pro ) font & this Xcode theme for you:
17
+ This will install [ Adobe's Source Code Pro] ( https://github.com/adobe-fonts/source-code-pro ) font and this Xcode theme for you. Afterward, you can remove the downloaded folder:
18
+
19
19
```
20
- $ marathon run johnsundell/xcodetheme
20
+ $ cd ..
21
+ $ rm -rf XcodeTheme
21
22
```
22
23
23
24
## Installing manually
Original file line number Diff line number Diff line change 1
1
import Foundation
2
- import Files // marathon:https://github.com/JohnSundell/Files.git
3
- import ShellOut // marathon:https://github.com/JohnSundell/ShellOut.git
2
+ import Files
3
+ import ShellOut
4
4
5
- let fontsFolder = try Folder . home. subfolder ( atPath : " Library/Fonts " )
5
+ let fontsFolder = try Folder . home. subfolder ( at : " Library/Fonts " )
6
6
7
7
if !fontsFolder. containsFile ( named: " SourceCodePro-Regular.ttf " ) {
8
8
print ( " 🅰️ Downloading Source Code Pro font... " )
@@ -23,19 +23,17 @@ if !fontsFolder.containsFile(named: "SourceCodePro-Regular.ttf") {
23
23
try fontZipFile. delete ( )
24
24
}
25
25
26
- print ( " 🎨 Downloading Xcode theme... " )
26
+ print ( " 🎨 Installing Xcode theme... " )
27
27
28
- let themeURL = URL ( string : " https://raw.githubusercontent.com/JohnSundell/ XcodeTheme/master/ SundellsColors.xccolortheme" ) !
28
+ let themeURL = URL ( fileURLWithPath : #file . replacingOccurrences ( of : " Sources/ XcodeTheme/main.swift " , with : " SundellsColors.xccolortheme " ) )
29
29
let themeData = try Data ( contentsOf: themeURL)
30
30
31
- print ( " 🎨 Installing Xcode theme... " )
32
-
33
- let xcodeFolder = try Folder . home. subfolder ( atPath: " Library/Developer/Xcode " )
31
+ let xcodeFolder = try Folder . home. subfolder ( at: " Library/Developer/Xcode " )
34
32
let userDataFolder = try xcodeFolder. createSubfolderIfNeeded ( withName: " UserData " )
35
33
let themeFolder = try userDataFolder. createSubfolderIfNeeded ( withName: " FontAndColorThemes " )
36
34
37
35
let themeFile = try themeFolder. createFile ( named: " SundellsColors.xccolortheme " )
38
- try themeFile. write ( data : themeData)
36
+ try themeFile. write ( themeData)
39
37
40
38
print ( " " )
41
39
print ( " 🎉 Sundell's Colors successfully installed " )
You can’t perform that action at this time.
0 commit comments