playgroundbooks / playgroundbook

Tool for Swift Playground books
https://ashfurrow.com/blog/swift-playground-books/
MIT License
259 stars 17 forks source link

Complete Playground Page Manifest implementation #45

Open pietbrauer opened 8 years ago

pietbrauer commented 8 years ago

Playground pages can be modified with various arguments (Source]:

Argument Type Description Required
Hints Array of dictionaries An array of static hints and optional spoilers. See Hints Key.
LiveViewEdgeToEdge Boolean Sets the live view to extend past the margin in the area used for live views. See LiveViewEdgeToEdge Key.
LiveViewMode String Sets the live view to show even when it is not running. See LiveViewMode Key.
Name String The name displayed in the user interface. See Name Key.
PlaygroundLoggingMode String Controls the display of results in playground pages. See PlaygroundLoggingMode Key.
PosterReference String An image shown before the live view runs. See PosterReference Key.

Currently we support LiveViewEdgeToEdge, LiveViewMode and Name.

The manifest.plist is written in lib/playgroundbook/page_writer.rb and can easily be extended with the missing parameters described above.

This can be a good first step for someone who is looking to contribute.