1.0.2 • Published 7 years ago

agileboard v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Agile Board

Agile Board

Installation:

$ npm install agileboard

How to run:

Run example

$ npm run example

Run tests

$ npm test

Run tests with code coverage tool istanbul

$ npm run coverage

Card

Instantiation

Card can be instantiated by providing title, description and point.

let card = Card('title', 'desc', 10);

.getTitle()

Return the title of the card

.getDescription()

Return the description of the card

.getPoint()

Return the point of the card

.equals(othercard)

Compare with the other card. It returns true it the titles and descriptions are the same.

let card1 = Card('title', 'desc', 10);
let card2 = Card('title', 'desc', 10);

card1.equals(card2) // return true

Board

Instantiation

Board can be instantiated by providing an array of column names.

let board = Board(['starting', 'done']);

.createNewIteration()

Create a new iteration and overwrite the existing one. One board can only have one iteration for now.

.getIteration()

Get the current iteration

Iteration

Instantiation

Iteration can be created by calling board.createNewIteration() It will throw an exception if the board does not have the mandatory columns: starting & done. By default, the WIP for every column is 10.

let board1 = Board(['starting', 'done']);
let iteration = board1.createNewIteration();

let board2 = Board(['in progress']);
iteration = board2.createNewIteration(); // throw an exception

.add(card)

  • card: Object (Card)

Add a card to the iteration. The card will be put into a stand by column

let board = Board(['starting', 'done']);
let iteration = board.createNewIteration();
let card = Card('title', 'desc', 10);

iteration.add(card);

.moveCard(card, column)

  • card: Object (Card)
  • column: string

Move the card to a specified column. This function will fisrt find the card that is the same as the one provided (using card.equals()). And then move the card to the specified column.

iteration.add(card);
iteration.move(card, 'done');

.undoLastMove()

Undo the last move on the iteration. Consecutively calling undo() can only undo one move.

iteration.add(card);
iteration.move(card, 'starting');
iteration.move(card, 'done');
iteration.undoLastMove() // the card is moved back to starting
iteration.undoLastMove() // no effect

.velocity()

Return the sum of the points of all cards that are in the done column for an iteration

let board = Board(['starting', 'done']);
let iteration = board.createNewIteration();
let card = Card('title', 'desc', 10);
iteration.add(card);
iteration.move(card, 'done');
iteration.velocity(); // return 10

.getCards(column)

  • column: string

Return an array of all the cards in the specified column

let board = Board(['starting', 'done']);
let iteration = board.createNewIteration();
let card = Card('title', 'desc', 10);
iteration.add(card);
iteration.move(card, 'done');
iteration.getCards('done'); // return [card]

.setWIP(column, wip)

  • column: string
  • wip: number (>= 0)

Set the work in progress limit for the specified column

iteration.setWIP('starting', 10);
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago