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
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/repl/README.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -704,6 +704,48 @@ Stops logging commands and printed output to a file path associated with a speci
704
704
// TODO
705
705
```
706
706
707
+
#### presentationStart( \[text, ]\[options] )
708
+
709
+
Starts a REPL [presentation][@stdlib/repl/presentation].
710
+
711
+
```text
712
+
In [1]: var id = presentationStart( 'beep\n---\nboop\n' );
713
+
```
714
+
715
+
The function accepts the following `options`:
716
+
717
+
-**borderTop**: top border character sequence. Default: `'*'`.
718
+
-**borderBottom**: bottom border character sequence. Default: `'*'`.
719
+
-**borderLeft**: left border character sequence. Default: `'* '`.
720
+
-**borderRight**: right border character sequence. Default: `' *'`.
721
+
-**counter**: slide counter. Can either be `true`, `false`, or `'progress'`. Default: `false`.
722
+
-**width**: [presentation][@stdlib/repl/presentation] width. If `null`, the [presentation][@stdlib/repl/presentation] width is either computed based on the screen size (if a REPL output stream is TTY) or set to `80` characters. Default: `null`.
723
+
-**height**: [presentation][@stdlib/repl/presentation] height. If `null`, the [presentation][@stdlib/repl/presentation] height is either computed based on the screen size (if a REPL output stream is TTY) or set to `25` rows. Default: `null`.
724
+
-**workspace**: REPL workspace name. A [presentation][@stdlib/repl/presentation] adds commands to the specified workspace, thus allowing [presentation][@stdlib/repl/presentation] navigation and interaction. Default: `'presentation-<n>'`, where `n` is an assigned [presentation][@stdlib/repl/presentation] identifier.
725
+
-**load**: file path specifying a [presentation][@stdlib/repl/presentation] file to load. If presentation `text` is provided, this option is **ignored**. Otherwise, this option is **required**.
726
+
-**watch**: `boolean` indicating whether to watch a [presentation][@stdlib/repl/presentation] source file for changes. This option is only applicable if not provided presentation `text` and the `options` object specifies a presentation file to load. Default: `false`.
727
+
-**autoClear**: `boolean` indicating whether to automatically clear the screen before writing a rendered slide to the REPL. Default: `true`.
728
+
729
+
A few notes:
730
+
731
+
- When not provided presentation `text`, an options argument **must** specify a presentation file to load.
732
+
- If a specified workspace already exists, the workspace is silently cleared and a new [presentation][@stdlib/repl/presentation] bound. In order to preserve an existing workspace, specify an alternative presentation workspace name.
733
+
734
+
#### presentationStop( \[id] )
735
+
736
+
Stops a REPL [presentation][@stdlib/repl/presentation].
737
+
738
+
```text
739
+
In [1]: var id = presentationStart( 'beep\n---\nboop\n' );
740
+
741
+
In [2]: presentationStop();
742
+
```
743
+
744
+
A few notes:
745
+
746
+
- If provided a presentation identifier, the corresponding [presentation][@stdlib/repl/presentation] is stopped. Otherwise, assuming the function is invoked in a presentation workspace, the current [presentation][@stdlib/repl/presentation] is stopped.
747
+
- When stopping a REPL [presentation][@stdlib/repl/presentation], the presentation's REPL workspace is both **cleared** and **deleted**.
0 commit comments