markdown-playgrounds

所属分类:代码编辑器
开发工具:Swift
文件大小:19KB
下载次数:0
上传日期:2020-01-10 07:04:15
上 传 者sh-1993
说明:  可以执行Swift代码的标记编辑器
(A Markdown Editor that can execute Swift code)

文件列表:
LICENSE.md (1064, 2020-01-10)
Package.resolved (605, 2020-01-10)
Package.swift (961, 2020-01-10)
Sources (0, 2020-01-10)
Sources\MarkdownPlaygrounds (0, 2020-01-10)
Sources\MarkdownPlaygrounds\Boilerplate.swift (7255, 2020-01-10)
Sources\MarkdownPlaygrounds\Document.swift (3861, 2020-01-10)
Sources\MarkdownPlaygrounds\Helpers.swift (476, 2020-01-10)
Sources\MarkdownPlaygrounds\Highlighting.swift (7047, 2020-01-10)
Sources\MarkdownPlaygrounds\REPL.swift (3837, 2020-01-10)
Sources\MarkdownPlaygrounds\SwiftHighlighting.swift (6044, 2020-01-10)
Sources\MarkdownPlaygrounds\main.swift (6646, 2020-01-10)
Tests (0, 2020-01-10)
Tests\LinuxMain.swift (138, 2020-01-10)
Tests\MarkdownPlaygroundsTests (0, 2020-01-10)
Tests\MarkdownPlaygroundsTests\MarkdownPlaygroundTests.swift (209, 2020-01-10)
Tests\MarkdownPlaygroundsTests\XCTestManifests.swift (171, 2020-01-10)
todo.txt (1279, 2020-01-10)

# ° Markdown Playgrounds for Swift [![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) [![@objcio](https://img.shields.io/badge/contact-%40objcio-blue.svg?style=flat)](https://twitter.com/objcio) ## What it does This app reads and writes Markdown documents that contain Swift code. The code can be executed too! You can run individual code blocks, or all the blocks in a file. We're using this app to update our book [Advanced Swift](https://www.objc.io/books/advanced-swift/), and while writing [blog posts](https://www.objc.io/blog/archive/). We find it very useful, and we hope you do too. ## How it works The app works by sending Swift code to a REPL instance, then reading back the results. Compared to Swift Playgrounds or Xcode's playgrounds, this is quite limiting, but it also means we can keep things simple. Screen Shot 2019-04-02 at 12 51 40 ## Learn more We're documenting the building of this app on [Swift Talk](https://talk.objc.io/collections/markdown-playgrounds), a weekly video series of conversational live-coding hosted by [Chris Eidhof](https://twitter.com/chriseidhof) and [Florian Kugler](https://twitter.com/floriankugler).

video cover

The [first episode](https://talk.objc.io/episodes/S01E145-setting-up-a-document-based-app) previews the app, and is free to watch. - 145: [Setting Up a Document Based App](https://talk.objc.io/episodes/S01E145-setting-up-a-document-based-app) ”“ Public - 146: [Markdown Syntax Highlighting](https://talk.objc.io/episodes/S01E146-markdown-syntax-highlighting) ” ”’ Subscriber - 147: [Executing Swift Code](https://talk.objc.io/episodes/S01E147-executing-swift-code) ””’ Subscriber - 148: [String Handling](https://talk.objc.io/episodes/S01E148-string-handling) ””’ Subscriber ## Building *Note*: currently this builds, but doesn't run from Xcode. Instead, build and run from the command line. - You need to have [cmark](https://github.com/commonmark/cmark) installed *from master* (not via homebrew). If you use the version from homebrew, you won't get proper syntax highlighting (specifically: for inline elements). - This project uses [Swift Package Manager](https://github.com/apple/swift-package-manager). You can either run "swift build" or do "swift package generate-xcodeproj" Here are the steps as shell commands: ```sh git clone https://github.com/commonmark/cmark cd cmark mkdir build cd build cmake .. make make test make install cd ../.. # Building this project git clone https://github.com/objcio/markdown-playgrounds cd markdown-playgrounds swift build # If you want to edit this in Xcode swift package generate-xcodeproj xed . ``` ## Future Direction This project could head in a number of directions, and there are many useful features we could add. Our main goal is to keep using this for authoring Swift-heavy Markdown, which will guide our decisions when we decide on new features. To keep things simple, we have collected a list of todos in [todo.txt](todo.txt). ## License This library is released under the MIT license. See [LICENSE](LICENSE) for details.

近期下载者

相关文件


收藏者