File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
44
55![ ] ( Preview.png )
66
7- ## Installing using Marathon
7+ ## Installing using Swift Package Manager
88
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 ` :
1010
11- 1 . Install the latest version of Marathon if you haven't already:
1211```
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
1615```
1716
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+
1919```
20- $ marathon run johnsundell/xcodetheme
20+ $ cd ..
21+ $ rm -rf XcodeTheme
2122```
2223
2324## Installing manually
Original file line number Diff line number Diff line change 11import 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
44
5- let fontsFolder = try Folder . home. subfolder ( atPath : " Library/Fonts " )
5+ let fontsFolder = try Folder . home. subfolder ( at : " Library/Fonts " )
66
77if !fontsFolder. containsFile ( named: " SourceCodePro-Regular.ttf " ) {
88 print ( " 🅰️ Downloading Source Code Pro font... " )
@@ -23,19 +23,17 @@ if !fontsFolder.containsFile(named: "SourceCodePro-Regular.ttf") {
2323 try fontZipFile. delete ( )
2424}
2525
26- print ( " 🎨 Downloading Xcode theme... " )
26+ print ( " 🎨 Installing Xcode theme... " )
2727
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 " ) )
2929let themeData = try Data ( contentsOf: themeURL)
3030
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 " )
3432let userDataFolder = try xcodeFolder. createSubfolderIfNeeded ( withName: " UserData " )
3533let themeFolder = try userDataFolder. createSubfolderIfNeeded ( withName: " FontAndColorThemes " )
3634
3735let themeFile = try themeFolder. createFile ( named: " SundellsColors.xccolortheme " )
38- try themeFile. write ( data : themeData)
36+ try themeFile. write ( themeData)
3937
4038print ( " " )
4139print ( " 🎉 Sundell's Colors successfully installed " )
You can’t perform that action at this time.
0 commit comments