Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jihoonahn/xcodesnippet
Snippet Creation Tool for Swift developers
https://github.com/jihoonahn/xcodesnippet
cli codesnippets snippet swift swift-package-manager xcode xcode-snippets xcodesnippets
Last synced: 3 days ago
JSON representation
Snippet Creation Tool for Swift developers
- Host: GitHub
- URL: https://github.com/jihoonahn/xcodesnippet
- Owner: Jihoonahn
- License: mit
- Created: 2022-12-11T08:03:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T03:50:38.000Z (almost 2 years ago)
- Last Synced: 2023-03-06T03:23:52.999Z (over 1 year ago)
- Topics: cli, codesnippets, snippet, swift, swift-package-manager, xcode, xcode-snippets, xcodesnippets
- Language: Swift
- Homepage:
- Size: 36.1 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**XcodeSnippet** provides the ability to save or use the codeSnippet that you set up.
## Snippet as Swift packages
The usage of XcodeSnippet is very similar to that of Snippet in traditional Xcode.
Projects are defined as Swift Packages, all of which use the default format type-safe swift code.```swift
import XcodeSnippetstruct SnippetEx: Snippet {
var xcodeSnippet: [XcodeSnippet] = []
}try snippetEx().install()
```
You can use it like this. XcodeSnipet is really simple, right?## Installation
XcodeSnippet was deployed as Swift Package Manager. Package to install in a project. Add as a dependent item within the swift manifest.
```swift
let package = Package(
...
dependencies: [
.package(url: "https://github.com/JiHoonAHN/XcodeSnippet.git", from: "0.1.1")
],
...
)
```
Then import the XcodeSnipet from the location you want to use.
```swift
import XcodeSnippet
```XcodeSnippet also comes with command-line tools to easily create projects for easy project support.
```
$ git clone https://github.com/JiHoonAHN/XcodeSnippet.git
$ cd XcodeSnippet
$ make
```Then run the instructions on how to use `XcodeSnippet help`.
## Quick start
To start XcodeSnippet faster, clone this repository, install the command-line tool, and run `make` within the replicated folder.```
$ git clone https://github.com/JiHoonAHN/XcodeSnippet.git
$ cd XcodeSnippet
$ make
```_**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._
Then, create a new folder for your new Snippet project and simply run `xcodeSnippet new` within it to get started:
```
$ mkdir MySnippet
$ cd MySnippet
$ xcodeSnippet new
```
Finally, run `open Package.swift` to open up the project in Xcode to start making your snippet Setting!## License
**XcodeSnippet** is under MIT license. See the [LICENSE](LICENSE) file for more info.