-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Npm package generation fixes + readme updated.
- Loading branch information
Renan Verissimo de vasconcelos
committed
Nov 19, 2018
1 parent
8571393
commit 5d8fe2e
Showing
8 changed files
with
85 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build | ||
docs | ||
examples | ||
src | ||
.babelrc | ||
gulpfile.babel.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,66 @@ | ||
# bracketzada | ||
# bracketzada | ||
A JavaScript library for tournament brackets generation. Design your own way, Bracketzada do the rest. Live example: https://katreque.github.io/bracketzada/ | ||
|
||
## Why? | ||
Most of tournament bracket generators/libs implement algorithms and create components for you. Bracketzada has the idea to provide an API to generate and manage tournaments while you create and design your own frontend. The freedom you want, the power you need. | ||
|
||
## Types | ||
Implemented: | ||
- Simple Elimination | ||
|
||
Future: | ||
- Double Elimination | ||
- Swiss Brackets | ||
|
||
|
||
## Quick Start | ||
Install bracketzada via npm on your project: | ||
|
||
``` | ||
npm install bracketzada --save | ||
``` | ||
|
||
Import both Player and Tournament classes and generate Tournament Brackets object, with all the info you need. | ||
|
||
```javascript | ||
let {Player, Tournament} = require('bracketzada'); | ||
let players = [ | ||
new Player(0, 'Kappa'), | ||
new Player(1, 'Keppo'), | ||
new Player(2, 'PogChamp'), | ||
new Player(3, '4Head') | ||
]; | ||
let championship = new Tournament(); | ||
let brackets = championship.generateBrackets(); | ||
|
||
/* | ||
brackets: | ||
[ Node { | ||
id: 0, | ||
idChildren: [ 1 ], | ||
playerLeft: undefined, | ||
playerRight: undefined }, | ||
Node { | ||
id: 1, | ||
idChildren: [ 2, 3 ], | ||
playerLeft: undefined, | ||
playerRight: undefined }, | ||
Node { | ||
id: 2, | ||
idChildren: [], | ||
playerLeft: Player { id: 0, name: 'Kappa' }, | ||
playerRight: Player { id: 1, name: 'Keppo' } }, | ||
Node { | ||
id: 3, | ||
idChildren: [], | ||
playerLeft: Player { id: 2, name: 'PogChamp' }, | ||
playerRight: Player { id: 3, name: '4Head' } } ] | ||
*/ | ||
``` | ||
|
||
## Methods | ||
|
||
|
||
## License | ||
[MIT](https://github.com/Katreque/bracketzada/blob/master/LICENSE) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('./dist/bracketzada.min.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters