Skip to content

tpunt/lwc-plugin-countdown-to-close

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Countdown to Close - Lightweight Charts™ Plugin

This plugin adds a countdown timer onto the last price line of LWC. It requires LWC version 5.0.9 or greater.

Features:

  • Customise the last price line (style, thickness, colour)
  • Customise the last price label (background colour, text colour, price formatting)
  • Customise the countdown timer (e.g. to display 1m 12s, 01:12, etc)

Installation

npm install lwc-plugin-countdown-to-close

Usage

import { CountdownToClose, CountdownToCloseOptions, TimeToClose } from 'lwc-plugin-countdown-to-close';

Visual Demo

Using the default countdown:

default-countdown.mov

Development

Running Locally

npm install
npm run dev

Visit localhost:5173 in the browser.

Building the Package

npm run compile

This will:

  1. Compile TypeScript to JavaScript
  2. Bundle the plugin for both ES modules and UMD
  3. Generate TypeScript type definitions
  4. Output everything to the dist/ folder

Publishing To NPM

You can configure the contents of the package's package.json within the compile.mjs script.

Once you have compiled the plugin (see above section) then you can publish the package to NPM with these commands:

cd dist
npm publish

Hint: append --dry-run to the end of the publish command to see the results of the publish command without actually uploading the package to NPM.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published