Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

brackets-viewer

1.2.0 • Public • Published

brackets-viewer.js

A simple library to display tournament brackets (round-robin, single elimination, double elimination)

It contains all the logic needed to display tournaments.

npm

How to use?

Import the library using jsDelivr:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Drarig29/brackets-viewer.js/dist/brackets-viewer.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Drarig29/brackets-viewer.js/dist/brackets-viewer.min.js"></script>

Or using npm:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/brackets-viewer/dist/brackets-viewer.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/brackets-viewer/dist/brackets-viewer.min.js"></script>

Now, you can use it with data generated using brackets-manager just like in the /demo folder.

To quickly test, you can use json-server:

  • Run the npm script named db to serve the static database file /demo/db.json

    npm run db
  • Use directly the db.json file generated by unit tests in the brackets-manager project

    npx json-server --watch path/to/brackets-manager/db.json

How to build?

Install all npm dependencies:

npm install

Build with webpack:

npm run build

Credits

This library has been created to be used by the Nantarena.

It has been inspired by:

Install

npm i brackets-viewer

DownloadsWeekly Downloads

25

Version

1.2.0

License

ISC

Unpacked Size

21.5 kB

Total Files

5

Last publish

Collaborators

  • avatar