Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Frantss/preact-typescript-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

preact-typescript-template

My personal template for Preact + Typescript with extra addons.

Installation

npx preact-cli create Frantss/preact-typescript-template <project-name>

Options

Preact-CLI options:

  --name        The application name.
  --cwd         A directory to use instead of $PWD.
  --force       Force option to create the directory for the new app  [boolean] [default: false]
  --yarn        Installs dependencies with yarn.                      [boolean] [default: false]
  --git         Initialize version control using git.                 [boolean] [default: false]
  --install     Installs dependencies.                                [boolean] [default: true]

Includes

Commands

  • yarn install: Installs dependencies

  • yarn dev: Run a development, HMR server

  • yarn serve: Run a production-like server

  • yarn build: Production-ready build

  • yarn lint: Check linting in typescript and scss files

  • yarn lint:fix: Fix linting issues in typescript and scss files

  • yarn test: Run tests

  • yarn test:watch: Run tests in watch mode

  • yarn test:coverage: Run tests in coverage mode

  • yarn test:e2e: Run all cypress tests

For detailed explanation on how things work, checkout the Preact-CLI Readme.