Skip to content

Commit a6526eb

Browse files
committed
✨ Better template with electron 17.1
1 parent 8887a94 commit a6526eb

34 files changed

+6324
-6410
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
# production
1212
/build
13-
/dist
1413

1514
# misc
1615
.DS_Store
@@ -22,3 +21,4 @@
2221
npm-debug.log*
2322
yarn-debug.log*
2423
yarn-error.log*
24+
dist

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
dist
3+
node_modules

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": true,
4+
"bracketSpacing": true,
5+
"singleQuote": false,
6+
"endOfLine": "crlf",
7+
"trailingComma": "all",
8+
"semi": true
9+
}

LICENSE

Lines changed: 671 additions & 4 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# ⚛ Electron - React Template With Router
1+
# ⚛ Electron - React - TailwindCSS Template With Router
22

3-
A very simple and functional template for you to use Electron and React together.
3+
A very simple and functional template for you to use Electron, React and TailwindCSS together.
44

55
# 🎀 Features
66

77
- Use React for creating interfaces
88
- Use `react-router-dom` for routing
9+
- Use TailwindCSS for styling
10+
- Basic functions are ready to use such as creating tray icon, creating notifications etc.
911

1012
# 🤓 Insatllation
1113

@@ -17,3 +19,7 @@ A very simple and functional template for you to use Electron and React together
1719
# 🧦 Contributing
1820

1921
Fell free to use GitHub's features.
22+
23+
# 📄 Copyrights
24+
25+
Copyrights for `public/favicon.ico`, `public/icon.ico` and `public/icon.png` are owned by [Brawlhalla, Blue Mammoth Games](https://www.brawlhalla.com/)

package.json

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
11
{
2-
"name": "electron-react-starter-template",
3-
"version": "0.1.0",
4-
"private": true,
2+
"name": "electron-react-tailwind-template",
53
"author": {
64
"email": "demirci.baris38@gmail.com",
75
"name": "Barış DEMİRCİ",
8-
"url": "https://bariscodes.me/"
6+
"url": "https://338.rocks"
97
},
10-
"description": "⚛ Electron app template with react and router.",
11-
"license": "MIT",
8+
"description": "Electron app template with React and Tailwind CSS",
129
"repository": {
1310
"type": "git",
14-
"url": "https://github.com/barbarbar338/electron-react-template"
11+
"url": "https://github.com/barbarbar338/electron-react-tailwind-template"
1512
},
13+
"license": "GPL-3.0",
14+
"version": "1.0.0",
15+
"private": true,
1616
"devDependencies": {
17-
"@types/node": "^12.0.0",
18-
"@types/react": "^17.0.0",
19-
"@types/react-dom": "^17.0.0",
20-
"@types/react-router-dom": "^5.1.7",
21-
"concurrently": "^6.0.1",
17+
"@types/node": "^17.0.21",
18+
"@types/react": "^17.0.39",
19+
"@types/react-dom": "^17.0.11",
20+
"@types/react-router-dom": "^5.3.3",
21+
"autoprefixer": "^10.4.2",
22+
"concurrently": "^7.0.0",
2223
"cross-env": "^7.0.3",
23-
"electron": "^12.0.2",
24-
"electron-builder": "^22.10.5",
25-
"react-scripts": "4.0.3",
26-
"typescript": "^4.1.2",
27-
"wait-on": "^5.3.0"
24+
"electron": "^17.1.0",
25+
"electron-builder": "^22.14.13",
26+
"postcss": "^8.4.7",
27+
"prettier": "^2.5.1",
28+
"react-scripts": "^5.0.0",
29+
"rimraf": "^3.0.2",
30+
"tailwindcss": "3.0.23",
31+
"typescript": "^4.5.5",
32+
"wait-on": "^6.0.1"
2833
},
2934
"dependencies": {
30-
"@electron/remote": "^1.1.0",
35+
"@electron/remote": "^2.0.5",
36+
"auto-launch": "^5.0.5",
3137
"electron-is-dev": "^2.0.0",
38+
"electron-reloader": "^1.2.3",
3239
"electron-squirrel-startup": "^1.0.0",
3340
"react": "^17.0.2",
3441
"react-dom": "^17.0.2",
35-
"react-router-dom": "^5.2.0"
42+
"react-icons": "^4.3.1",
43+
"react-router-dom": "^6.2.1",
44+
"react-toastify": "^8.2.0",
45+
"react-use": "^17.3.2"
3646
},
3747
"main": "public/main.js",
3848
"homepage": "./",
3949
"scripts": {
50+
"prebuild": "rimraf build && rimraf dist",
4051
"react:build": "react-scripts build",
4152
"react:dev": "react-scripts start",
4253
"electron:build": "electron-builder -c.extraMetadata.main=build/main.js",
43-
"electron:dev": "wait-on tcp:3000 && electron .",
54+
"electron:dev": "electron .",
4455
"build": "npm run react:build && npm run electron:build",
45-
"dev": "concurrently -k \"cross-env BROWSER=none npm run react:dev\" \"npm run electron:dev\""
46-
},
47-
"build": {
48-
"extends": null,
49-
"appId": "com.example.app",
50-
"files": [
51-
"dist/**/*",
52-
"build/**/*",
53-
"node_modules/**/*",
54-
"package.json"
55-
],
56-
"directories": {
57-
"buildResources": "assets"
58-
}
56+
"dev": "concurrently -k \"cross-env BROWSER=none npm run react:dev\" \"npm run electron:dev\"",
57+
"format": "prettier --write ."
5958
},
6059
"eslintConfig": {
6160
"extends": [
62-
"react-app",
63-
"react-app/jest"
61+
"react-app"
6462
]
6563
},
6664
"browserslist": {
@@ -74,5 +72,20 @@
7472
"last 1 firefox version",
7573
"last 1 safari version"
7674
]
75+
},
76+
"build": {
77+
"extends": null,
78+
"appId": "com.example.app",
79+
"files": [
80+
"dist/**/*",
81+
"build/**/*",
82+
"node_modules/**/*",
83+
"package.json",
84+
"build/icon.*"
85+
],
86+
"directories": {
87+
"buildResources": "assets"
88+
},
89+
"icon": "./build/icon.ico"
7790
}
7891
}

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

public/favicon.ico

176 KB
Binary file not shown.

public/icon.ico

180 KB
Binary file not shown.

public/icon.png

82.9 KB
Loading

0 commit comments

Comments
 (0)