0.0.6 • Published 7 months ago

dol-match-bracket v0.0.6

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

dol-match-bracket

  • Javascript Library to make tree structured tournament brackets.
  • using Recursion to generate tournament bracket based on match JSON not team JSON(example below)

Install

  • npm install
$ npm install
  • gulp Development Mode - local server and watch
$ gulp dev
  • gulp bulid
$ gulp
or
$ gulp build

Common Structure.

Data Example

<body>
<div id="dol-bracket"></div>
const arr = [
        {
          id: 1, //required
          school1: 'a', //required -> team1 name
          score1: 9,   //team1 score
          score2: 4,   //team1 score
          school2: 'b',  //required -> team2 name
          state: 'ended',
          next: 3, //required this indicates parents bracket idx
        },
        ...
        ]
   MakeDolBracket('#dol-bracket', arr, {});
</body>
  • result: