https://github.com/chomosuke/yatzy
https://github.com/chomosuke/yatzy
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chomosuke/yatzy
- Owner: chomosuke
- Created: 2022-03-04T01:13:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T02:22:03.000Z (over 4 years ago)
- Last Synced: 2025-02-15T07:17:46.535Z (over 1 year ago)
- Language: TypeScript
- Size: 68.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yatzy
## setup dev environment
- Install node, npm and yarn.
- If you're using vscode
- Copy `.vscode base` directory and rename it to `.vscode`.
- Install extension: `vscode-zipfs` (already recommended in [.vscode base/extensions.json](.vscode%20base/extensions.json)).
- These let vscode work with yarn properly.
## tips
- If you dislike format on save, you can disable it in `.vscode/settings.json`.
- For TDD, you might want to run you test as frequently as possible, you can use the command `yarn test --watch` to do that.
## how to run
- `yarn serve` to run the program immediately.
- `yarn build` to build the program into javascript.
- `yarn start` to run the build result.
## Quirks and features of this project
- Its template came from https://github.com/chomosuke/typescript-template
- Its eslint config extends from https://github.com/chomosuke/eslint-config
- It uses yarn zero install, this means:
- The dependency is committed to the repository under [.yarn/cache](.yarn/cache).
- You don't have to run yarn install when you clone the repository.
- You know for a fact that yarn is deterministic, or in another word, you don't even care if yarn is deterministic, because git make sure all your developers' dependencies are the same.
- Sometimes if your dependencies gets too large, you might need git lfs to manage it.
- You can opt out of zero install by gitignoring different files, more detail at [.gitignore](.gitignore).
- eslint plugin for vscode (recommended in [.vscode base/extensions.json](.vscode%20base/extensions.json)) help you catch your linting error at the earliest second.
- It uses jest [snapshot testing](https://jestjs.io/docs/snapshot-testing) to ensure that `play()` always behave the same given two pseudo random players.