npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

litfass

v1.5.2

Published

A library for advertising displays

Downloads

21

Readme

A browser-based digital advertising column / display / pole / poster / kiosk with support for multiple displays. Use a default.yaml configuration file in a ./config folder to define pages and Litfaß will present them in rotation on all connected displays.

The name of this library was inspired by the German name of advertising columns "Litfaßsäule" and its inventor Ernst Litfaß.

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 12 is recommended.

To run Litfaß, use can also use the npx command:

$ npx litfass start

Configuration

To configure the Litfaß display, go to the node_modules/litfass folder. In case you installed Litfaß globally, use the following command to locate the right directory:

$ npm root -g

In the litfass directory you'll find a config sub-folder containing a default.yaml configuration file. The configuration is explained in the YAML file. Check out the config package for more details on the configuration formats supported. Copy the default.yaml to a config folder from where you execute Litfaß to create an own configuration.

The following settings are available in the configuration file:

  • displays: An array of displays, to specify different rotations on different displays connected. In case more displays are connected than specified here, the first display configuration will be used.
    • pages: An array of URLs to rotate the display between (e.g. https://example.com and https://kra.lc/ will rotate between those two pages in the set rotationSpeed)
    • rotationSpeed: The number of seconds each page should be displayed. In case some pages should be displayed longer than others, you can also specify an array. By default a page is displayed for 10 seconds before being rotated.
    • transitionAnimation: Litfaß supports transitioning between multiple pages when rotating. The following animations are supported none, fade, slideUp, slideLeft, defaults to fade. You can also use an object { name: ..., duration: ... } to specify the speed of the transition in milliseconds.
    • ignore: If set Litfaß will ignore this display and will not start a browser on the specified display.
  • launchTimeout: The number of seconds Litfaß will display its slash / launch screen.
  • browserOptions: Options that will be merged into the launch options for Puppeteer / Chrome, e.g. handy in case you would like to specify an own executablePath for Chrome. browserOptions can also be set per display in the displays configuration.
  • preparePages: Litfaß will automatically attempt to prepare any page, before it is displayed. This setting can be used to specify if Litfaß should prepare the pages (true / false) and / or the number of pages to prepare in advance. The setting preparationTime will determine how much in advance Litfaß is going to attempt to load the next tab (default to 5 seconds).
  • watchDisplays: Litfaß will automatically watch for the number of displays connected and compare it to the number of still open Litfaß displays. In case either a physical change of displays connected / disconnected, or in case a Litfaß browser window was closed, Litfaß will automatically restart and show browsers on all connected displays again. Can be turned off by setting this property to false.

By default the displays configuration section contains only one element. This causes the same rotation of pages to be displayed on all connected displays. Define multiple entries in the displays section, where each entry corresponds to one display connected. To ignore a display use ignore: true.

Author

Written by Kristian Kraljić.

Reporting bugs

Please file any issues on Github.

License

This library is licensed under the MIT license.