Skip to content

Commit 1003f43

Browse files
committed
Update docs
1 parent 66409b6 commit 1003f43

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

docs/api/nfnl/api.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
- [`compile-all-files`](#compile-all-files)
66
- [`compile-file`](#compile-file)
7+
- [`delete-orphans`](#delete-orphans)
78
- [`dofile`](#dofile)
9+
- [`find-orphans`](#find-orphans)
810

911
## `compile-all-files`
1012
Function signature:
@@ -32,6 +34,15 @@ Compiles a file into the matching Lua file. Returns the compilation result. Take
3234

3335
Also displays all results via the notify system.
3436

37+
## `delete-orphans`
38+
Function signature:
39+
40+
```
41+
(delete-orphans {:dir dir})
42+
```
43+
44+
Delete orphan Lua files that were compiled from a Fennel file that no longer exists.
45+
3546
## `dofile`
3647
Function signature:
3748

@@ -41,6 +52,15 @@ Function signature:
4152

4253
Just like :luafile, takes a Fennel file path (optional, defaults to '%', runs it through expand) and executes it from disk. However! This doesn't compile the Fennel! It maps the Fennel path to the matching Lua file already in your file system and executes that with Lua's built in dofile. So you need to have already written your .fnl and had nfnl compile that to a .lua for this to work, it's just a convinience function for you to call directly or through the :NfnlFile command.
4354

55+
## `find-orphans`
56+
Function signature:
57+
58+
```
59+
(find-orphans {:dir dir :passive? passive?})
60+
```
61+
62+
Find orphan Lua files that were compiled from a Fennel file that no longer exists. Display them with notify. Set opts.passive? to true if you don't want it to tell you that there are no orphans.
63+
4464

4565
<!-- Generated with Fenneldoc v1.0.1
4666
https://gitlab.com/andreyorst/fenneldoc -->

docs/api/nfnl/gc.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Gc.fnl
2+
3+
**Table of contents**
4+
5+
- [`find-orphan-lua-files`](#find-orphan-lua-files)
6+
7+
## `find-orphan-lua-files`
8+
Function signature:
9+
10+
```
11+
(find-orphan-lua-files {:cfg cfg :root-dir root-dir})
12+
```
13+
14+
**Undocumented**
15+
16+
17+
<!-- Generated with Fenneldoc v1.0.1
18+
https://gitlab.com/andreyorst/fenneldoc -->

docs/api/nfnl/header.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Header.fnl
2+
3+
**Table of contents**
4+
5+
- [`source-path`](#source-path)
6+
- [`tagged?`](#tagged)
7+
- [`with-header`](#with-header)
8+
9+
## `source-path`
10+
Function signature:
11+
12+
```
13+
(source-path s)
14+
```
15+
16+
**Undocumented**
17+
18+
## `tagged?`
19+
Function signature:
20+
21+
```
22+
(tagged? s)
23+
```
24+
25+
Is the line an nfnl tagged header line?
26+
27+
## `with-header`
28+
Function signature:
29+
30+
```
31+
(with-header file src)
32+
```
33+
34+
Return the source with an nfnl header prepended.
35+
36+
37+
<!-- Generated with Fenneldoc v1.0.1
38+
https://gitlab.com/andreyorst/fenneldoc -->

0 commit comments

Comments
 (0)