Skip to content

Commit 3c0ffca

Browse files
author
codesbiome
committed
Initial commit
0 parents  commit 3c0ffca

32 files changed

+8809
-0
lines changed

.eslintrc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:react/recommended",
10+
"plugin:@typescript-eslint/eslint-recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:import/errors",
13+
"plugin:import/warnings"
14+
],
15+
"parser": "@typescript-eslint/parser",
16+
"settings": {
17+
"import/resolver": {
18+
"node": {
19+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
20+
},
21+
"alias": {
22+
"map": [
23+
["@renderer", "./src/renderer"],
24+
["@components", "./src/renderer/components"],
25+
["@common", "./src/common"],
26+
["@main", "./src/main"],
27+
["@src", "./src"],
28+
["@misc", "./misc"],
29+
["@assets", "./assets"]
30+
],
31+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
32+
}
33+
},
34+
"react": {
35+
"version": "latest"
36+
}
37+
},
38+
"rules": {
39+
"react/prop-types": "off",
40+
"@typescript-eslint/no-var-requires": "off"
41+
}
42+
}

.gitignore

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
.DS_Store
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript cache
40+
*.tsbuildinfo
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
.env.test
60+
61+
# parcel-bundler cache (https://parceljs.org/)
62+
.cache
63+
64+
# next.js build output
65+
.next
66+
67+
# nuxt.js build output
68+
.nuxt
69+
70+
# vuepress build output
71+
.vuepress/dist
72+
73+
# Serverless directories
74+
.serverless/
75+
76+
# FuseBox cache
77+
.fusebox/
78+
79+
# DynamoDB Local files
80+
.dynamodb/
81+
82+
# Webpack
83+
.webpack/
84+
85+
# Electron-Forge
86+
out/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "misc/window"]
2+
path = misc/window
3+
url = https://github.com/guasam/electron-window-js

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"jsxSingleQuote": true
5+
}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Change Log
2+
3+
All notable changes to the project are listed here.
4+
5+
### v1.0.0
6+
7+
- Electron upgraded to latest version `v18.0.1`
8+
- Add custom window frame & titlebar with menus etc. *Thanks to [@guasam](https://github.com/guasam)*
9+
- Add support for `sass/scss` stylesheets
10+
- Update `README` based on this project

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Codesbiome
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Electron React Webpack Boilerplate (JavaScript)
2+
3+
ERWT is a minimal boilerplate for writing Desktop Applications using [Electron](https://www.electronjs.org/), [React](https://reactjs.org/), [Webpack](https://webpack.js.org/) & JavaScript. <br /> This project makes use of latest packages and configurations to serve the best environment for development.
4+
5+
## Screenshot
6+
7+
<img src="assets/images/screen_550.jpg" />
8+
9+
<br>
10+
11+
## Custom Window Titlebar & Menu
12+
13+
This project now includes custom [Electron Window](https://github.com/guasam/electron-window), Titlebar, Menu Items, Window Controls & application icon etc by default. Menu items and windows controls layout or colors can be customized easily by modifying the `misc/window` modules. The `windows` platform buttons are being used by default in the Titlebar.
14+
15+
Menubar can be toggled by pressing `ALT` key
16+
17+
<center>
18+
<img src="assets/images/titlebar_showcase.png" />
19+
</center>
20+
21+
<br>
22+
23+
## Core Features
24+
25+
- 📐 Custom Window & Titlebar with Menus
26+
- 🌟 Electron
27+
- 🌀 JavaScript
28+
- ⚛️ React
29+
- 🛶 LESS Loader
30+
- 🎨 CSS Loader
31+
- 📸 Image Loader
32+
- 🆎 Font Loader
33+
- 🧹 ESLint
34+
- 📦 Electron Forge
35+
- 🔱 Webpack & Configuration
36+
- 🧩 Aliases for project paths
37+
- 🔥 Hot Module Replacement (Live Reload)
38+
- 🎁 Package Bundling (Distribution / Release)
39+
40+
<br />
41+
42+
## Installation
43+
44+
To clone the ERWT boilerplate, you need to run following commands:
45+
46+
```bash
47+
git clone --recurse-submodules https://github.com/codesbiome/electron-react-webpack-typescript-2022
48+
```
49+
50+
<br>
51+
52+
Install dependencies using [Yarn](https://www.npmjs.com/package/yarn) or [NPM](https://www.npmjs.com/) :
53+
54+
```bash
55+
yarn install
56+
```
57+
58+
<br />
59+
60+
## Start : Development
61+
62+
To develop and run your application, you need to run following command.
63+
<br />
64+
Start electron application for development :
65+
66+
```bash
67+
yarn start
68+
```
69+
70+
<br />
71+
72+
## Lint : Development
73+
74+
To lint application source code using ESLint via this command :
75+
76+
```bash
77+
yarn lint
78+
```
79+
80+
<br />
81+
82+
## Package : Production
83+
84+
Customize and package your Electron app with OS-specific bundles (.app, .exe etc)
85+
86+
```bash
87+
yarn package
88+
```
89+
90+
<br />
91+
92+
## Make : Production
93+
94+
Making is a way of taking your packaged application and making platform specific distributables like DMG, EXE, or Flatpak files (amongst others).
95+
96+
```bash
97+
yarn make
98+
```
99+
100+
<br />
101+
102+
## Publish : Production
103+
104+
Publishing is a way of taking the artifacts generated by the `make` command and sending them to a service somewhere for you to distribute or use as updates. (This could be your update server or an S3 bucket)
105+
106+
```bash
107+
yarn publish
108+
```
109+
110+
<br />
111+
112+
## Packager & Makers Configuration
113+
114+
This provides an easy way of configuring your packaged application and making platform specific distributables like DMG, EXE, or Flatpak files.
115+
116+
This configurations file is available in :
117+
118+
```bash
119+
tools/forge/forge.config.js
120+
```
121+
122+
For further information, you can visit [Electron Forge Configuration](https://www.electronforge.io/configuration)

assets/images/appIcon.ico

4.19 KB
Binary file not shown.

assets/images/intro.png

50 KB
Loading

assets/images/logo.png

3.35 KB
Loading

0 commit comments

Comments
 (0)