Giter Site home page Giter Site logo

tictactoe's Introduction

Nano React App Default Javascript Template

The default template project for nano-react-app.

  • npm start โ€” This will spawn a development server with a default port of 3000.
  • npm run build โ€” This will output a production build in the dist directory.

Check the game out: https://t-t-t.surge.sh/

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 1234

Or edit the start script directly:

vite --port 1234

Adding styles

You can use CSS files with simple ES2015 import statements anywhere in your Javascript:

import './index.css';

Babel transforms

The Babel preset 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:

npm i -D gh-pages

Use the following scripts for deployment:

"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.

tictactoe's People

Contributors

meehirmanitrips avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.