Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The TypeScript template for Preact CLI

License

NotificationsYou must be signed in to change notification settings

preactjs-templates/typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

  • This is a TypeScript version of the default template forpreact-cli.
  • For Preact: General information about how to workwith Preact, not specific to this template

Usage

$ npx preact-cli create typescript my-project$cd my-project$ npm install$ npm run dev

Development server runs on port8080. If the default port is already in use onyour machine it will start the development server on a random port.

Commands

  • npm install: Installs dependencies

  • npm run dev: Run a development, HMR server

  • npm run serve: Run a production-like server

  • npm run build: Production-ready build

  • npm run lint: Pass TypeScript files using ESLint

  • npm run test: Run Jest and Enzyme withenzyme-adapter-preact-pure foryour tests

How to Test

Thetypescript template provides a basic test setup with Jest, Enzyme andenzyme-adapter-preact-pure.You are free to change Enzyme with any other testing library(eg.Preact Testing Library).

You can run all additional Jest CLI commands with thenpm run test command asdescribed in theJest docs.For example, running jest in watch mode would be :

  • npm run test -- --watch instead ofjest --watch

About

The TypeScript template for Preact CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors28


[8]ページ先頭

©2009-2025 Movatter.jp