This is a basic Electron app template using Tailwind CSS, created by SK-Digital. It provides a simple and efficient starting point for your Electron projects.
Before you begin, ensure you have met the following requirements:
To install the template, follow these steps:
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
npm install
To use the template, follow these steps:
npm run build:css
npm run dev
This will start the Electron app with hot-reloading for both the main and renderer processes.
main.js
src/index.html
for your app's structuresrc/assets/styles/styles.css
src/js/index.js
and src/js/renderer.js
for renderer logicsrc/assets/
To build the app for production and create an installer, we'll use Electron Forge. Electron Forge is already included in this template, so you don't need to install it separately. Follow these steps to create a distributable version of your app:
Make sure all your changes are saved and committed.
Run the following command to create a production build:
npm run make
Electron Forge will create a out
directory in your project folder. Inside, you'll find:
You can customize the build process by editing the forge.config.js
file in the root of your project.
For more information on configuring Electron Forge, refer to the Electron Forge documentation.