Skip to content
This repository was archived by the owner on May 1, 2023. It is now read-only.

Commit 0699ff3

Browse files
committed
Update readMe
1 parent 71d23bb commit 0699ff3

File tree

1 file changed

+96
-3
lines changed

1 file changed

+96
-3
lines changed

README.md

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,97 @@
1-
# XcodeSnippet
1+
<p align="center">
2+
<img src="https://user-images.githubusercontent.com/68891494/206922287-5c034eb8-8cd0-4c03-9c95-233aeae4b40f.svg" width="500" max-width="90%" alt="XcodeSnippet" />
3+
</p>
24

3-
A description of this package.
4-
# XcodeSnippet
5+
<p align="center">
6+
<img src="https://img.shields.io/badge/Swift-5.5-orange.svg" />
7+
<a href="https://swift.org/package-manager">
8+
<img src="https://img.shields.io/badge/swiftpm-compatible-brightgreen.svg?style=flat" alt="Swift Package Manager" />
9+
</a>
10+
</p>
11+
12+
**XcodeSnippet** provides the ability to save or use the codeSnippet that you set up.
13+
14+
## Snippet as Swift packages
15+
The usage of XcodeSnippet is very similar to that of Snippet in traditional Xcode.
16+
Projects are defined as Swift Packages, all of which use the default format type-safe swift code.
17+
18+
```swift
19+
import XcodeSnippet
20+
21+
struct SnippetEx: Snippet {
22+
var xcodeSnippet: [XcodeSnippet] = []
23+
}
24+
25+
_ = try snippetEx().install()
26+
```
27+
You can use it like this. XcodeSnipet is really simple, right?
28+
29+
## Installation
30+
XcodeSnippet was deployed as Swift Package Manager. Package to install in a project. Add as a dependent item within the swift manifest.
31+
```swift
32+
let package = Package(
33+
...
34+
dependencies: [
35+
.package(url: "https://github.com/JiHoonAHN/XcodeSnippet.git", from: "0.0.1")
36+
],
37+
...
38+
)
39+
```
40+
Then import the XcodeSnipet from the location you want to use.
41+
```swift
42+
import XcodeSnippet
43+
```
44+
45+
XcodeSnippet also comes with command-line tools to easily create projects for easy project support.
46+
```
47+
$ git clone https://github.com/JiHoonAHN/XcodeSnippet.git
48+
$ cd XcodeSnippet
49+
$ make
50+
```
51+
52+
Then run the instructions on how to use `XcodeSnippet help`.
53+
54+
## Quick start
55+
To start XcodeSnippet faster, clone this repository, install the command-line tool, and run `make` within the replicated folder.
56+
57+
```
58+
$ git clone https://github.com/JiHoonAHN/XcodeSnippet.git
59+
$ cd XcodeSnippet
60+
$ make
61+
```
62+
63+
_**Note**: If you encounter an error while running `make`, ensure that you have your Command Line Tools location set from Xcode's preferences. It's in Preferences > Locations > Locations > Command Line Tools. The dropdown will be blank if it hasn't been set yet._
64+
65+
Then, create a new folder for your new Snippet project and simply run `xcodeSnippet new` within it to get started:
66+
67+
```
68+
$ mkdir MySnippet
69+
$ cd MySnippet
70+
$ xcodeSnippet new
71+
```
72+
Finally, run `open Package.swift` to open up the project in Xcode to start making your snippet Setting!
73+
74+
### MIT License
75+
```
76+
MIT License
77+
78+
Copyright (c) 2022 안지훈
79+
80+
Permission is hereby granted, free of charge, to any person obtaining a copy
81+
of this software and associated documentation files (the "Software"), to deal
82+
in the Software without restriction, including without limitation the rights
83+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84+
copies of the Software, and to permit persons to whom the Software is
85+
furnished to do so, subject to the following conditions:
86+
87+
The above copyright notice and this permission notice shall be included in all
88+
copies or substantial portions of the Software.
89+
90+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
92+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
95+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
96+
SOFTWARE.
97+
```

0 commit comments

Comments
 (0)