1.0.2 • Published 4 years ago

@sandrahoang686/random-games v1.0.2

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

@sandrahoang686/random-games

This is Sandra's npm package library of random command line game(s)

Structure

Root

  • The basics of an npm project (package.json, etc).
  • index.js is the main file where functions can be called from the published npm packageSrc
    • lib folder contains the the modules of random games that can be played in this library
    • tests folder contains the unit and integration tests
    • constants.js file contains static constants that can be easily accessed anywhere
    • helpers.js file contains generic logic that be shared accross different modules

Modules

readline

Native. Allows ability to prompt users for input.

promisify

Native in Util's Module. Allows transformation of callback based functions to async functions.

Versioning & Publishing

This library is published to NPM and can be accessed publicly. When new features or bug fixes are added, for users to be able to access those changes you must publish a new version of this library. To version and publish, follow these instructions... 1. Run npm login in command line if not already logged in. 2. In the package.json, increment the version. 3. Run npm publish --access public

Now users should be able to access this library by running npm install @sandrahoang686/random-games. Then the user can import the games like const { tictactoe } = require('@sandrahoang686/random-games') for example.

Testing

Jest

Testing framework used for unit and integration tests.

TODOs

  • Finish unit testing the helper methods, the functions in the game modules and add integration testing.
  • Add the functionality to let two human players play
  • Add more games