Skip to content

arysaikyn/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚢 BATTLESHIP

Version Documentation

A Battleship game using Test Driven Development with Jest. Developed for The Odin Project's curriculum.

✨ Demo

Battleship Homepage

📜 Docs

Install

npm install

Installs dependencies.

Start

npm run start

Starts the development server.

Test

npm run test

Runs the tests.

Watch

npm run watch

Runs the test runner in watch mode.

Build

npm run build

Builds the app for production to the dist directory.

🚀 Manual Deployment

Deploy to GitHub Pages from dist directory.

  1. Remove distdirectory from .gitignore.

  2. Create production bundle:

npm run build
  1. Make sure git knows about your subtree (the subfolder with your site).
git add dist && git commit -m "Initial dist subtree commit"
  1. Use subtree push to send it to the gh-pages branch on GitHub.
git subtree push --prefix dist origin gh-pages

📖 Lessons Learned

  • How to setup testing.
  • Developing using Test Driven Development with Jest.
  • Using Factory Functions and the Module Pattern.
  • Manual deployment to GitHub Pages.
  • Using webpack for bundling and compiling.

Author

👤 Arys Aikyn