This template provides a basic structure for an Electron application using TypeScript, Tailwind CSS, and webpack.
Before you begin, ensure you have the following installed:
Click the "Use this template" button on the GitHub page of this repository.
Name your new project and create the repository.
Clone your new repository locally:
git clone https://github.com/Acro88/electron-typescript-tailwind-webpack-template.git
Navigate to the project directory:
cd your-project-name
Install dependencies:
npm install
Run the application in development mode:
npm start
.
├── src/
│ ├── main/
│ │ └── index.ts # Main process
│ ├── preload/
│ │ └── preload.ts # Preload scripts
│ └── renderer/
│ ├── index.html # HTML template
│ ├── renderer.ts # Renderer process
│ └── styles.css # Styles (including Tailwind)
├── .eslintrc.json # ESLint configuration
├── .gitignore
├── forge.config.ts # Electron Forge configuration
├── package.json
├── postcss.config.js # PostCSS configuration
├── tailwind.config.js # Tailwind configuration
├── tsconfig.json # TypeScript configuration
├── webpack.main.config.ts # Webpack configuration for main process
├── webpack.plugins.ts # Webpack plugins
├── webpack.renderer.config.ts # Webpack configuration for renderer process
└── webpack.rules.ts # Webpack rules
npm start
: Runs the app in development modenpm run package
: Packages the appnpm run make
: Creates a distributable packagenpm run publish
: Publishes the appnpm run lint
: Runs ESLintsrc/main/index.ts
to add functionality to the main process.src/renderer/renderer.ts
and src/renderer/index.html
to update the UI and renderer process functionality.src/renderer/styles.css
for custom CSS and Tailwind classes.forge.config.ts
for packaging and distribution options.