Skip to content
secrettriangle edited this page Dec 28, 2014 · 6 revisions

Welcome to the slap wiki! Join us in #slap on Freenode for troubleshooting, theme/plugin/core development, or palm strike discussion of any nature.

Architecture

The slap command line is an alias created by package.json to the script /usr/lib/node_modules/slap/index.js, which is a file that simply contains a shebang (so to make the shell interpret it as a Node script) and require('./lib/cli').

lib/cli.js

Contains all instantiation logic. It creates the Slap instance, opens all the files passed from the command line, and passes through your ~/.slap/config along with any command-line options.

lib/ui/

Slap

This is the main class that inherits from blessed.Screen. It is the UI element that contains all other UI elements. It is created at startup and there is one per slap process. It is stored as Slap.global or self.slap (for any element inheriting from BaseElement).

Header

This is the top bar that displays the slap logo, the current position within the buffer, the encoding, and Help button. It inherits from BaseElement.

Clone this wiki locally