Skip to content

Commit

Permalink
feat: better
Browse files Browse the repository at this point in the history
  • Loading branch information
saucesteals committed Jul 10, 2021
1 parent 32447af commit ecfad6b
Show file tree
Hide file tree
Showing 19 changed files with 212 additions and 20 deletions.
31 changes: 24 additions & 7 deletions .configs/forge.config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,59 @@
const path = require("path");
require("dotenv").config();

const appIconsPath = path.join(__dirname, "..", "assets", "appicons", "icons");
const packageAssetsPath = path.join(__dirname, "..", "assets", "package");

module.exports = {
packagerConfig: {
icon: path.join(appIconsPath, "win", "icon.ico"),
icon: path.join(packageAssetsPath, "icons", "win", "icon.ico"),
asar: true,
},
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "saucesteals",
name: "electron-typescript-react-tailwind-redux",
authToken: process.env.GITHUB_TOKEN,
},
draft: true,
prerelease: true,
},
},
],
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {
// https://js.electronforge.io/maker/squirrel/interfaces/makersquirrelconfig
setupExe: "Windows Setup.exe",
iconUrl:
"https://raw.githubusercontent.com/saucesteals/electron-typescript-react-tailwind-redux/main/assets/appicons/icons/win/icon.ico",
setupIcon: path.join(appIconsPath, "win", "icon.ico"),
"https://raw.githubusercontent.com/saucesteals/electron-typescript-react-tailwind-redux/main/assets/package/icons/win/icon.ico",
setupIcon: path.join(packageAssetsPath, "icons", "win", "icon.ico"),
authors: "saucesteals & fourwadu",
loadingGif: path.join(packageAssetsPath, "loading.gif"),
},
},
{
name: "@electron-forge/maker-dmg",
config: {
// https://js.electronforge.io/maker/dmg/interfaces/makerdmgconfig
icon: path.join(appIconsPath, "mac", "icon.icns"),
icon: path.join(packageAssetsPath, "icons", "mac", "icon.icns"),
},
},
{
name: "@electron-forge/maker-deb",
config: {
// https://js.electronforge.io/maker/deb/interfaces/makerdebconfig
icon: path.join(appIconsPath, "png", "1024x1024.png"),
icon: path.join(packageAssetsPath, "icons", "png", "1024x1024.png"),
},
},
{
name: "@electron-forge/maker-rpm",
config: {
// https://js.electronforge.io/maker/rpm/interfaces/makerrpmconfig
icon: path.join(appIconsPath, "png", "1024x1024.png"),
icon: path.join(packageAssetsPath, "icons", "png", "1024x1024.png"),
},
},
],
Expand Down
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# electron-typescript-react-webpack-tailwind-redux

>An Electron boilerplate featuring Typescript, React, Webpack, TailwindCSS and Redux (featuring [Electron Store](https://github.com/sindresorhus/electron-store) & [Redux Persist](https://github.com/saucesteals/electron-persist-secure)) - ready to use for all frontend applications.
>An Electron boilerplate featuring Typescript, React, Webpack, TailwindCSS and Redux ([Electron Persist Secure](https://github.com/saucesteals/electron-persist-secure) x [Redux Persist](https://github.com/rt2zz/redux-persist)) - ready to use for all frontend applications.
Configuring an Electron desktop application can be tricky.

This module creates a secure, modular, and easy to use configuration for best practice React and Electron technologies that you may want in your application!

### Install
---

### **Installation**


```sh
Expand All @@ -17,23 +19,46 @@ $ cd your-project-name
$ yarn
```

### Starting Development
---

### **Starting Development**

Start the app in the `dev` environment:
```sh
yarn start
```

### Packaging for Production
---

### **Packaging for Production**
To package apps into a local executable:
```sh
yarn make:win
# yarn make:mac
# yarn make:linux
```

### Customizing your application
---

### **Releasing with GitHub**
1. Open your `env.example` file (or `.env` if you have already made one)
2. Set your `GH_TOKEN`
3. Rename the file to `.env` if not already done so
```sh
yarn publish:win
# yarn publish:mac
# yarn publish:linux
```

---

### **Customizing your application**

Customizing features from this boilerplate is extremely easy. You can remove features such as React Router and Redux simply by deleting files associated with them.

### Contributing
---

### **Contributing**
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

Expand All @@ -44,6 +69,8 @@ Contributions are what make the open source community such an amazing place to b
5. Open a Pull Request and leave some comments!


### Maintainers
---

### **Maintainers**
* [Noah (wadu)](https://github.com/fourwadu/)
* [Daniel (sauce)](https://github.com/saucesteals/)
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Binary file added assets/package/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
3 changes: 3 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/settings/tokens
# Make sure to give the "repo" scope to this token
GITHUB_TOKEN=ghp_xxxxxx
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "cross-env NODE_ENV=development eslint . --cache --ext .js,.jsx,.ts,.tsx",
"prepare": "husky install",
"commit": "cz",
"create-icons": "electron-icon-builder --input=./assets/appicons/source.png --output=./assets/appicons",
"create-icons": "electron-icon-builder --input=./assets/package/source.png --output=./assets/package",
"make:mac": "electron-forge make --platform darwin",
"make:linux": "electron-forge make --platform linux",
"make:win": "electron-forge make --platform win32"
"make:win": "electron-forge make --platform win32",
"publish:mac": "electron-forge publish --platform darwin",
"publish:linux": "electron-forge publish --platform linux",
"publish:win": "electron-forge publish --platform win32"
},
"keywords": [],
"author": {
Expand Down Expand Up @@ -84,6 +86,7 @@
"commitizen": "^4.2.4",
"cross-env": "^7.0.3",
"css-loader": "^5.0.0",
"dotenv": "^10.0.0",
"electron": "13.1.6",
"electron-icon-builder": "^2.0.1",
"eslint": "^7.6.0",
Expand All @@ -103,6 +106,7 @@
"typescript": "^4.0.2"
},
"dependencies": {
"@electron-forge/publisher-github": "^6.0.0-beta.57",
"electron-is-dev": "^2.0.0",
"electron-persist-secure": "^1.1.7",
"electron-squirrel-startup": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const createWindow = (): void => {
__dirname,
"..",
"assets",
"appicons",
"package",
"icons",
"png",
"1024x1024.png"
Expand Down
Loading

0 comments on commit ecfad6b

Please sign in to comment.