0.3.1 • Published 6 months ago

presentable v0.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Presentable

Easily create formatted code snippets for presentations.

Installation

npm install --global presentable

Alternatively, prefix the below command with npx --yes.

Usage

presentable \
  --font 'JetBrains Mono' \
  --style 'stackoverflow-light' \
  path/to/snippets/*.js

would create an image (test-1.png) like:

Image of a formatted code sample

along with the HTML (test-1.html) used to render the image.

Arguments

As well as a positional list of files to process, the CLI accepts the following flags:

  • --background/-b: whether to include the background (default: true)
  • --font/-f: the name of a font on Google Fonts to use (default: undefined, accept the UI's default)
  • --output/-o: the directory to output to (default: "output/")
  • --style/-s: the Highlight.js style to use (default: "default") - you can preview these here
  • --width/-w: the target print width (default: 50, a reasonable fit for half a slide)

Snippets

If a file contains folding regions, e.g.:

// ... imports and setup

//#region: snippet
console.log("this is my example");
//#endregion

the code from each region is extracted and saved into a separate file.

0.2.1

6 months ago

0.3.1

6 months ago

0.2.2

6 months ago

5.3.1

8 years ago

5.3.0

8 years ago

5.2.0

8 years ago

5.1.1

8 years ago

5.1.0

8 years ago

5.0.0

8 years ago

4.1.2

8 years ago

4.1.1

8 years ago

4.1.0

8 years ago

4.0.0

8 years ago

3.4.8

8 years ago

3.4.7

8 years ago

3.4.6

8 years ago

3.4.5

8 years ago

3.4.4

8 years ago

3.4.3

8 years ago

3.4.2

8 years ago

3.4.1

8 years ago

3.4.0

8 years ago

3.3.0

8 years ago

3.2.3

8 years ago

3.2.2

8 years ago

3.2.1

8 years ago

3.2.0

8 years ago

3.1.3

8 years ago

3.1.2

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago