Skip to content

Commit 2decf78

Browse files
committed
Document command
1 parent d1cb12c commit 2decf78

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

lib/node_modules/@stdlib/repl/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,29 @@ Stops saving commands to a file path associated with a specified record identifi
917917
// TODO
918918
```
919919

920+
#### tutorial( \[text, \[options]] )
921+
922+
Starts a tutorial.
923+
924+
```text
925+
In [1]: var id = tutorial( 'repl' );
926+
```
927+
928+
The function accepts the following `options`:
929+
930+
- **borderTop**: top border character sequence. Default: `'*'`.
931+
- **borderBottom**: bottom border character sequence. Default: `'*'`.
932+
- **borderLeft**: left border character sequence. Default: `'* '`.
933+
- **borderRight**: right border character sequence. Default: `' *'`.
934+
- **counter**: slide counter. Can either be `true`, `false`, or `'progress'`. Default: `progress`.
935+
- **workspace**: REPL workspace name. A tutorial [presentation][@stdlib/repl/presentation] adds commands to the specified workspace, thus allowing tutorial navigation and interaction. Default: `'tutorial-<name>-<n>'`, where `name` is the tutorial `name` and `n` is an assigned tutorial [presentation][@stdlib/repl/presentation] identifier.
936+
- **autoClear**: `boolean` indicating whether to automatically clear the screen before writing a rendered tutorial slide to the REPL. Default: `true`.
937+
938+
A few notes:
939+
940+
- When not provided a tutorial `name`, the function returns a list of available tutorials.
941+
- If a specified workspace already exists, the workspace is silently cleared and a new tutorial [presentation][@stdlib/repl/presentation] bound. In order to preserve an existing workspace, specify an alternative tutorial workspace name.
942+
920943
#### userDoc( alias, \[ref,] doc )
921944

922945
Adds user-defined documentation.

0 commit comments

Comments
 (0)