Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stackotter/swift-cmark-gfm
A minimal wrapper around cmark-gfm
https://github.com/stackotter/swift-cmark-gfm
Last synced: about 1 month ago
JSON representation
A minimal wrapper around cmark-gfm
- Host: GitHub
- URL: https://github.com/stackotter/swift-cmark-gfm
- Owner: stackotter
- License: apache-2.0
- Created: 2022-03-23T11:33:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T00:16:16.000Z (5 months ago)
- Last Synced: 2024-11-02T14:23:04.415Z (about 2 months ago)
- Language: C
- Size: 213 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CMarkGFM
This package just provides an easy way to import the cmark-gfm library into Swift. It does not wrap the C API with a nice Swift API. For that, see [Parsley](https://github.com/loopwerk/Parsley).
## Usage
Just include this package as a dependency in your `Package.swift`. Here's an example of how to do that:
```swift
let package = Package(
name: "Example",
dependencies: [
.package(url: "https://github.com/stackotter/swift-cmark-gfm", from: "1.0.0")
],
targets: [
.target(
name: "Example",
dependencies: [
.product(name: "CMarkGFM", package: "swift-cmark-gfm")
]
),
]
)
```## Automatic updater script
The main goal of this package is to be extremely easy to maintain. That's why I made the `update_cmark_gfm.sh` script. Running the script will automatically update this package to the latest version of `cmark-gfm`.
```sh
# Update the package to the latest version of cmark-gfm
./update_cmark_gfm.sh
```Alternatively, it can be used to update the package to a specific commit of `cmark-gfm`. Just provide a commit hash when running the script:
```sh
# Update the package to a specific version of cmark-gfm
./update_cmark_gfm.sh [commit]
```This means that if you have a project that requires a specific version of `cmark-gfm` for some reason. You can easily fork this repository and automatically tailor the package to your needs.