- Notifications
You must be signed in to change notification settings - Fork38
The TypeScript template for Preact CLI
License
preactjs-templates/typescript
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- 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
$ 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.
npm install
: Installs dependenciesnpm run dev
: Run a development, HMR servernpm run serve
: Run a production-like servernpm run build
: Production-ready buildnpm run lint
: Pass TypeScript files using ESLintnpm run test
: Run Jest and Enzyme withenzyme-adapter-preact-pure
foryour tests
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.