JSPM

nba-tipoff

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q24017F
  • License MIT

A command-line interface for following live NBA games in your terminal

Package Exports

  • nba-tipoff
  • nba-tipoff/src/main.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nba-tipoff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nba-tipoff - NBA Terminal Viewer

A command-line interface for following live NBA games directly in your terminal.

Installation

npm install -g nba-tipoff

Usage

# Launch with today's games
nba-tipoff

# Or use with npx (no installation required)
npx nba-tipoff

Development

Setup

# Clone the repository
git clone https://github.com/rfwilliams11/tipoff.git
cd tipoff

# Install dependencies
npm install

# Link the package locally for testing the CLI
npm link

Running the Application

# Run in development mode
npm run dev

# Or use the CLI command (if linked)
nba-tipoff

# Run with options
nba-tipoff --date 2024-01-15
nba-tipoff --team LAL

Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

Project Structure

  • bin/tipoff - CLI executable entry point
  • src/main.js - Application bootstrap (auto-starts when run directly)
  • src/cli.js - Command-line interface handler
  • src/components/ - React components for terminal UI
  • src/store/ - Redux store and slices (scoreboard, games)
  • src/services/ - API services and polling logic
  • src/utils/ - Utility functions and helpers

Architecture Notes

  • Terminal UI: Built with react-blessed for rendering React components in the terminal
  • State Management: Redux Toolkit for managing application state
  • Live Updates: Polling service for real-time game data from ESPN API
  • Entry Points:
    • npm run dev executes src/main.js directly (auto-starts)
    • nba-tipoff command runs through bin/tipoffcli.jsmain.start()

Features

  • View today's NBA games in terminal
  • Navigate between different dates
  • View detailed game information with live updates
  • Real-time statistics and play-by-play
  • Keyboard navigation and shortcuts

Keyboard Controls

Scoreboard View

  • / or j/k - Navigate between games
  • Enter - View detailed game information
  • n - Next day
  • p - Previous day
  • t - Go to today
  • q or Esc - Quit

Game Detail View

  • c - Return to scoreboard
  • q or Esc - Quit

License

MIT