- This is a TypeScript Widget template that can be used with Preact-CLI.
- For Preact: General information about how to work with Preact, not specific to this template
$ npx preact-cli create rschristian/ts-widget my-widget
$ cd my-widget
$ yarn
$ yarn serve:dev
Development server runs on port 3000
. If the default port is already in use on
your machine it will start the development server on a random port.
-
yarn
: Installs dependencies -
yarn serve:dev
: Run a development server -
yarn build
: NPM-ready build, for use in other Preact web apps -
yarn build:demo
: Production ready build of demo application -
yarn serve:demo
: Run a production-like server for the demo application -
npm run lint
: Pass TypeScript files using ESLint