You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`nef`, short for [Nefertiti](https://en.wikipedia.org/wiki/Nefertiti), mother of Ankhesenamun, is a command line tool to ease the creation of documentation in the form of Xcode Playgrounds. It provides compile-time verification of documentation, exports it in Markdown format that can be consumed by [Jekyll](https://jekyllrb.com/) to generate websites, and export [Carbon](https://carbon.now.sh/) snippets for given Xcode Playground.
19
+
`nef`, short for [Nefertiti](https://en.wikipedia.org/wiki/Nefertiti), mother of Ankhesenamun, is a toolset to ease the **creation of documentation** in the form of Xcode Playgrounds. It provides compile-time **verification** of documentation, exports it in **Markdown** format that can be consumed by [Jekyll](https://jekyllrb.com/) to generate websites, and export [Carbon](https://carbon.now.sh/) snippets for a given Xcode Playground.
17
20
18
21
`nef` is inspired by [ΛNK](https://github.com/arrow-kt/ank) for Kotlin and [tut](https://github.com/tpolecat/tut) for Scala.
19
22
20
-
## 📥 Installation
23
+
### Features
24
+
25
+
💡 Eases the creation of Xcode Playgrounds with support for [__third party libraries__](#-creating-a-xcode-playground).
26
+
27
+
💡 [__Compiles Xcode Playgrounds__](#-compiling-a-xcode-playground) with support for third party libraries from the command line.
21
28
22
-
`nef` can be installed using [Homebrew](https://brew.sh). `nef` needs Xcode and [Cocoapods](https://cocoapods.org) as dependencies. It will warn you if there is a missing dependency and will provide guidance to install it.
29
+
💡 Generates [__Markdown__](#-generating-a-markdown-project) project from Xcode Playground.
30
+
31
+
💡 Generates Markdown files that can be consumed from [__Jekyll__](#-generating-markdown-files-for-jekyll) to create a microsite.
32
+
33
+
💡 Export [__Carbon__](#-exporting-carbon-code-snippets) code snippets for given Xcode Playgrounds.
34
+
35
+
36
+
37
+
## 💻 Installation
38
+
39
+
#### 📟 Using [Homebrew](https://github.com/bow-swift/homebrew-nef) (preferred)
40
+
41
+
> It will warn you if there is a missing dependency and will provide guidance to install it.
23
42
24
43
<palign="center">
25
44
<imgsrc="assets/nef-installation.gif">
26
45
</p>
27
46
28
-
##🌟 Features
47
+
#### 📦 Using [Swift Package Manager](https://developer.apple.com/documentation/xcode/creating_a_swift_package_with_xcode)
29
48
30
-
`nef`highlights the following features:
49
+
`nef`can be consumed as a library in your **macOS project**.
31
50
32
-
💡 Eases the creation of Xcode Playgrounds with support for [__third party libraries__](#-creating-a-xcode-playground).
💡 [__Compiles Xcode Playgrounds__](#-compiling-a-xcode-playground) with support for third party libraries from the command line.
55
+
> You can read more about how to use nef library in the [**nef site**](https://nef.bow-swift.io/docs/tutorials/how-to-use-nef-library-/).
35
56
36
-
💡 Generates [__Markdown__](#-generating-a-markdown-project) project from Xcode Playground.
57
+
37
58
38
-
💡 Generates Markdown files that can be consumed from [__Jekyll__](#-generating-markdown-files-for-jekyll) to create a microsite.
59
+
#### 🔌 Using [Xcode Editor Extension](https://github.com/bow-swift/nef-plugin)
39
60
40
-
💡 Export [__Carbon__](#-exporting-carbon-code-snippets) code snippets for given Xcode Playgrounds.
61
+
Some of the `nef` features can be used directly in Xcode as an Extension. You can install it directly from [**App Store**](https://apps.apple.com/app/nef/id1479391704?mt=8).
41
62
42
63
43
64
65
+
## Usage
66
+
44
67
### 📃 Creating an Xcode Playground
45
68
46
69
Xcode Playgrounds are a nice tool for prototyping and trying new concepts. However, third party libraries support is a bit cumbersome to add. One of the goals of `nef` is to make the creation of an Xcode Playground easier with support for one or more libraries.
@@ -51,18 +74,28 @@ By default, `nef` can create an Xcode Playground with support for [Bow](http://b
51
74
➜ nef playground
52
75
```
53
76
77
+
<palign="center">
78
+
<imgsrc="assets/nef-playground.png"height="100">
79
+
</p>
80
+
54
81
And you can use the following option to specify the name for the Xcode project that you are creating:
55
82
56
83
```bash
57
84
➜ nef playground --name LatestBowProject
58
85
```
59
86
60
-
It will create an Xcode project with support for the latest available version of Bow, named `BowPlayground`. If you open this Xcode project, you will have an Xcode Playground where you can import Bow or any of its modules, and start trying some of its features.
87
+
It will create an Xcode project with support for the latest available version of Bow, named `LatestBowProject`. If you open this `nef playground`, you will have an Xcode Playground where you can import Bow or any of its modules, and start trying some of its features.
88
+
89
+
By default, `nef playground` will be created for iOS platform. If you need to change it, you can use the `--platform` option.
90
+
91
+
```bash
92
+
➜ nef playground --platform osx
93
+
```
61
94
62
95
###
63
96
64
97
<details>
65
-
<summary>You can select any different Bow version or branch, even a third-party dependency</summary>
98
+
<summary>📣 You can select any different Bow version or branch, even a third-party dependency</summary>
66
99
67
100
###
68
101
@@ -86,7 +119,7 @@ It will create an Xcode project with support for the latest available version of
86
119
87
120
##
88
121
89
-
-`--podfile <Podfile>`: Specify a Podfile with your own dependencies. This option lets you create a Playground with support for other libraries. Create a `Podfile` listing your dependencies and pass it to `nef`. Example:
122
+
-`--podfile <Podfile>`: Specify a **Podfile** with your own dependencies. This option lets you create a Playground with support for other libraries. Create a `Podfile` listing your dependencies and pass it to `nef`. Example:
90
123
91
124
Your `Podfile`, located in `./folder/dependencies`:
As you can write comments in [Markdown](https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_markup_formatting_ref/index.html) in Xcode Playgrounds, this makes it very suitable to write documentation with compilable examples.
165
212
Leveraging this, `nef` can create Markdown files that can be consumed from Jekyll to generate a microsite. The command to do this is:
@@ -177,7 +224,7 @@ Options:
177
224
###
178
225
179
226
<details>
180
-
<summary>How to setup an Xcode Playgroud for Jekyll?</summary>
227
+
<summary>📣 How to setup an Xcode Playgroud for Jekyll?</summary>
181
228
182
229
###
183
230
@@ -224,7 +271,7 @@ Options:
224
271
###
225
272
226
273
<details>
227
-
<summary>You can customize the output with the next commands</summary>
274
+
<summary>📣 You can customize the output with the next commands</summary>
As you can write comments in [Markdown](https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_markup_formatting_ref/index.html) in Xcode Playgrounds, this makes very suitable to write documentation with compilable examples.
15
15
Leveraging this, `nef` can create Markdown files that can be consumed from Jekyll to generate a microsite. The command to do this is:
Copy file name to clipboardexpand all lines: contents/Documentation/Quick start.playground/Pages/Creating an Xcode Playground.xcplaygroundpage/Contents.swift
You can use the following option to specify the name for the Xcode project that you are creating.
27
21
22
+

23
+
24
+
And you can use the following option to specify the name for the Xcode project that you are creating:
25
+
28
26
```bash
29
27
➜ nef playground --name LatestBowProject
28
+
```
29
+
30
+
It will create an Xcode project with support for the latest available version of Bow, named `LatestBowProject`. If you open this `nef playground`, you will have an Xcode Playground where you can import Bow or any of its modules, and start trying some of its features.
31
+
32
+
By default, `nef playground` will be created for iOS platform. If you need to change it, you can use the `--platform` option.
33
+
34
+
```bash
35
+
➜ nef playground --platform osx
30
36
```
31
37
32
-
It will create an Xcode project with support for the latest available version of Bow, named `BowPlayground`. If you open this Xcode project, you will have a Xcode Playground where you can import Bow or any of its modules, and start trying some of its features.
33
-
34
-
38
+
35
39
36
40
Besides this, you can select any different `Bow` version or branch, even a third-party dependency.
- `--bow-branch <branch-name>`: Specify the branch of Bow that you want to use in the project. This option lets you test features of Bow that are still in development in a branch that has not been merged or released yet. Example:
- `--podfile <Podfile>`: Specify a Podfile with your own dependencies. This option lets you create a Playground with support for other libraries. Create a `Podfile` listing your dependencies and pass it to `nef`. Example:
Copy file name to clipboardexpand all lines: contents/Documentation/Quick start.playground/Pages/Installation.xcplaygroundpage/Contents.swift
+21-2
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,10 @@
7
7
/*:
8
8
## 📥 Installation
9
9
10
-
`nef` can be installed using [Homebrew](https://brew.sh). `nef` needs Xcode and [Cocoapods](https://cocoapods.org) as dependencies. It will warn you if there is a missing dependency and will provide guidance to install it.
Some of the `nef` features can be used directly in Xcode as an Extension. You can install it directly from [**App Store**](https://apps.apple.com/app/nef/id1479391704?mt=8).
0 commit comments