Nef screenshot

Nef

Author Avatar Theme by Bow swift
Updated: 19 Jan 2022
270 Stars

steroids for Xcode Playgrounds

Overview

nef is a toolset designed to simplify the creation of documentation in the form of Xcode Playgrounds. It offers compile-time verification of documentation, exports it in Markdown format for use with Jekyll to generate websites, and can export Carbon snippets for a given Xcode Playground. nef is inspired by ΛNK for Kotlin and tut for Scala.

Features

  • Eases the creation of Xcode Playgrounds with support for third party libraries
  • Compiles Xcode Playgrounds with support for 3rd-party libraries from the command line
  • Builds a Playground Book for iPad with external dependencies defined in a Swift Package
  • Generates Markdown project from nef Playground
  • Generates Markdown files that can be consumed from Jekyll to create a microsite
  • Export Carbon code snippets for a given nef Playground

Installation

Using Homebrew (preferred)

Using Homebrew, you can install nef with the following steps:

  1. Open your terminal.
  2. Run the command: brew install nef

Using Swift Package Manager

nef can also be consumed as a library in your macOS project. To install it using Swift Package Manager:

  1. Open your project in Xcode.
  2. Go to File -> Swift Packages -> Add Package Dependency.
  3. Enter the repository URL: <repository-url>
  4. Follow the prompts to complete the installation.

Using Xcode Editor Extension

If you want to use some of nef’s features directly in Xcode as an Extension, you can install it from the App Store or download the last binary from the releases section.

Using your iPad

You can create Swift Playgrounds with third-party libraries directly on your iPad using the app nef Playgrounds.

Using a GitHub badge

To create a nef badge for your GitHub repository, allowing users to try your project on their iPads, follow the instructions provided on the nef website.

Summary

nef is a powerful toolset that simplifies the creation of documentation in the form of Xcode Playgrounds. With features such as support for third-party libraries, command line compilation, and generation of Markdown files, nef provides a comprehensive solution for documenting and sharing code. Whether you’re a developer looking to improve documentation workflow or a team wanting to create interactive learning materials, nef offers a range of features to enhance your productivity.