kangabru / preact-tailwind-electron-boilerplate

Electron boilerplate with Typescript + Preact + Tailwind CSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electron boilerplate for Typescript + Preact + Tailwind CSS

A minimal Electron boilerplate for Preact, Typescript and Tailwind CSS and bundled with Parcel.

Features

  • 🀍 Dead simple usage. Forget the project setup and just focus on the code.
  • 🎨 Easy to extend. Parcel brings zero config support for a dizzyingly array of plugins.
  • πŸ• Fast development. The site starts with a single command and automatically refreshes on file changes.
  • πŸ’» Deployment ready. Build, optimise, and minify files with a single command.
  • πŸ”Ž Productive typechecking. Write untyped code while prototyping and only typecheck when it matters.

πŸ‘Ÿ Install

Ensure node (v12.13+) is installed.

npm install

Update the boilerplate with your project details:

  • Update the title tag with your project name in index.html.
  • Update name, description, and authors values in package.json. Note these are required by the electron packager.

πŸ• Develop

npm start

The electron app will open and refresh automatically.

You can also run npm run main:start and npm run render:start scripts separately.

πŸ’» Release

npm run build

Builds will be available in the out folder. Configure your build further via these instructions.


πŸ€” Notes

Typescript typecheck notes
  • Typescript code is typechecked via the typecheck command and at the start of the start and build commands
  • Code is not typechecked on automatic files changes like most bundlers. This allows you write scrappy, untyped code whilst prototyping to keep development fast. Simply add types later before committing code.

Have an issue?

Post an issue and I'll be happy to help πŸ™‚

About

Electron boilerplate with Typescript + Preact + Tailwind CSS

License:MIT License


Languages

Language:TypeScript 77.4%Language:JavaScript 11.2%Language:HTML 7.0%Language:CSS 4.3%