https://github.com/mmggyy66/tic-tac-toe
a tic tac toe game
https://github.com/mmggyy66/tic-tac-toe
html5 javascript reactjs scss
Last synced: 3 months ago
JSON representation
a tic tac toe game
- Host: GitHub
- URL: https://github.com/mmggyy66/tic-tac-toe
- Owner: MMGGYY66
- Created: 2023-02-16T21:25:25.000Z (over 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-02-18T16:59:47.000Z (over 3 years ago)
- Last Synced: 2025-02-05T13:14:28.088Z (over 1 year ago)
- Topics: html5, javascript, reactjs, scss
- Language: JavaScript
- Homepage: https://mohamed-gamil-tictactoe.surge.sh/
- Size: 641 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My tic tac toe game
The live link: [tic-tac-toe](https://mohamed-gamil-tictactoe.surge.sh/).
- `npm start` — This will spawn a development server with a default port of `5173`.
- `npm run build` — This will output a production build in the `dist` directory.
- `npm run preview` — This will run the production build locally with a default port of `5173` (this will not work if you haven't generated the production build yet).
## Custom port
You can use the `-p` flag to specify a port for development. To do this, you can either run `npm start` with an additional flag:
```
npm start -- --port 3000
```
Or edit the `start` script directly:
```
vite --port 3000
```
## Adding styles
You can use CSS files with simple ES2015 `import` statements anywhere in your Javascript:
```js
import "./index.css";
```
## Babel transforms
The Babel preset [babel-preset-nano-react-app](https://github.com/nano-react-app/babel-preset-nano-react-app) is used to support the same transforms that Create React App supports.
The Babel configuration lives inside `package.json` and will override an external `.babelrc` file, so if you want to use `.babelrc` remember to delete the `babel` property inside `package.json`.
## Deploy to GitHub Pages
You can also deploy your project using GitHub pages.
First install the `gh-pages` [package](https://github.com/tschaub/gh-pages):
`npm i -D gh-pages`
Use the following scripts for deployment:
```js
"scripts": {
"start": "vite",
"build": "vite build",
"predeploy": "rm -rf dist && vite build",
"deploy": "gh-pages -d dist"
},
```
Then follow the normal procedure in GitHub Pages and select the `gh-pages` branch.