Coder Social home page Coder Social logo

bastion2's Introduction

Preact, TypeScript, Vite, @benchristel/taste

Setup

  1. Click the "Use this template" button on GitHub
  2. Clone the created repo
  3. Run the one-time setup script to install dependencies and git hooks:
    yarn setup
    

Development

Server and Typechecker

yarn dev
yarn ts
  • Opening the project in Visual Studio Code automatically starts the dev server and typescript typechecker.
  • The dev server runs at http://localhost:5173 (the port number is vite in 1337... sort of).
  • Output appears in the terminal pane (accessed via ctrl+~).
  • Type errors also show up in the problems pane (ctrl+shift+M).
  • The server and typechecker stop automatically when VS Code quits.

Tests

http://localhost:5173

  • Tests run in the browser. The test report appears at the top of the screen.
  • The page will refresh (re-running the tests) whenever you save a file.
  • The tests and test report are completely removed from production builds.

Formatting

  • Files get auto-formatted when you commit, so you'll never check in inconsistently-formatted code. To disable this behavior, delete .husky/pre-commit.
  • To format all files, run yarn format.
  • The code formatter is prettier. See .prettierrc for configuration.

Building for production

yarn build

To smoketest your production build before deploying it, I recommend installing serve:

yarn global add serve
serve dist

You can then view your app at http://localhost:3000.

Deploying

To deploy your built app to GitHub Pages, go to the Pages tab of your repo's settings and change the directory to deploy from to /docs.

This template repo is deployed at https://benchristel.github.io/preact-typescript-vite-taste/

bastion2's People

Contributors

benchristel avatar

Watchers

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