Skip to content

Commit 0270102

Browse files
authored
Merge pull request #1 from lukepistrol/main
Initial commit
2 parents b1bb125 + d63d3f3 commit 0270102

23 files changed

+619
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ playground.xcworkspace
4444
#
4545
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
4646
# hence it is not needed unless you have added a package configuration file to your project
47-
# .swiftpm
47+
.swiftpm
4848

4949
.build/
5050

Package.resolved

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// swift-tools-version: 5.5
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "CodeEditSymbols",
7+
platforms: [
8+
.macOS(.v12),
9+
],
10+
products: [
11+
// Products define the executables and libraries a package produces, and make them visible to other packages.
12+
.library(
13+
name: "CodeEditSymbols",
14+
targets: ["CodeEditSymbols"]),
15+
],
16+
dependencies: [
17+
.package(
18+
name: "SnapshotTesting",
19+
url: "https://github.com/pointfreeco/swift-snapshot-testing.git",
20+
from: "1.9.0"
21+
),
22+
],
23+
targets: [
24+
.target(
25+
name: "CodeEditSymbols",
26+
dependencies: []
27+
),
28+
.testTarget(
29+
name: "CodeEditSymbolsTests",
30+
dependencies: [
31+
"CodeEditSymbols",
32+
"SnapshotTesting"
33+
]
34+
),
35+
]
36+
)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CodeEditSymbols
2+
3+
A description of this package.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// CodeEditSymbols.swift
3+
//
4+
// Created by Lukas Pistrol on 18.04.22.
5+
//
6+
7+
import SwiftUI
8+
9+
public extension Image {
10+
11+
init(symbol: String) {
12+
self.init(symbol, bundle: Bundle.module)
13+
}
14+
15+
}
16+
17+
18+
public extension NSImage {
19+
20+
static func symbol(named: String) -> NSImage {
21+
Bundle.module.image(forResource: named) ?? .init()
22+
}
23+
24+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
},
6+
"symbols" : [
7+
{
8+
"filename" : "checkout.svg",
9+
"idiom" : "universal"
10+
}
11+
]
12+
}

Sources/CodeEditSymbols/Symbols.xcassets/checkout.symbolset/checkout.svg

Lines changed: 105 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
},
6+
"symbols" : [
7+
{
8+
"filename" : "commit.svg",
9+
"idiom" : "universal"
10+
}
11+
]
12+
}

Sources/CodeEditSymbols/Symbols.xcassets/commit.symbolset/commit.svg

Lines changed: 105 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)