$ npm install -g preact-cli
$ preact create widget my-widget
$ cd my-widget
$ npm install
$ npm run dev
dev: Starts a dev server with hotreload and widget placeholder.
build: Builds production ready UMD bundle ready to be embedded in any page.
start: Either starts a production ready dev server demo-ing your widget or local env based on your environment variable.
test: Runs your awesome UI tests with Jest.
serve: Builds and serves your widget.