-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
22,454 additions
and
6,913 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
* Webpack config for development electron main process | ||
*/ | ||
|
||
import path from 'path'; | ||
import webpack from 'webpack'; | ||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; | ||
import { merge } from 'webpack-merge'; | ||
import checkNodeEnv from '../scripts/check-node-env'; | ||
import baseConfig from './webpack.config.base'; | ||
import webpackPaths from './webpack.paths'; | ||
|
||
// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's | ||
// at the dev webpack config is not accidentally run in a production environment | ||
if (process.env.NODE_ENV === 'production') { | ||
checkNodeEnv('development'); | ||
} | ||
|
||
const configuration: webpack.Configuration = { | ||
devtool: 'inline-source-map', | ||
|
||
mode: 'development', | ||
|
||
target: 'electron-main', | ||
|
||
entry: { | ||
main: path.join(webpackPaths.srcMainPath, 'main.ts'), | ||
preload: path.join(webpackPaths.srcMainPath, 'preload.ts'), | ||
}, | ||
|
||
output: { | ||
path: webpackPaths.dllPath, | ||
filename: '[name].bundle.dev.js', | ||
library: { | ||
type: 'umd', | ||
}, | ||
}, | ||
|
||
plugins: [ | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
new BundleAnalyzerPlugin({ | ||
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled', | ||
analyzerPort: 8888, | ||
}), | ||
|
||
new webpack.DefinePlugin({ | ||
'process.type': '"browser"', | ||
}), | ||
], | ||
|
||
/** | ||
* Disables webpack processing of __dirname and __filename. | ||
* If you run the bundle in node.js it falls back to these values of node.js. | ||
* https://github.com/webpack/webpack/issues/2010 | ||
*/ | ||
node: { | ||
__dirname: false, | ||
__filename: false, | ||
}, | ||
}; | ||
|
||
export default merge(baseConfig, configuration); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import fs from 'fs'; | ||
import webpackPaths from '../configs/webpack.paths'; | ||
|
||
const { srcNodeModulesPath } = webpackPaths; | ||
const { appNodeModulesPath } = webpackPaths; | ||
const { srcNodeModulesPath, appNodeModulesPath, erbNodeModulesPath } = | ||
webpackPaths; | ||
|
||
if (!fs.existsSync(srcNodeModulesPath) && fs.existsSync(appNodeModulesPath)) { | ||
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction'); | ||
if (fs.existsSync(appNodeModulesPath)) { | ||
if (!fs.existsSync(srcNodeModulesPath)) { | ||
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction'); | ||
} | ||
if (!fs.existsSync(erbNodeModulesPath)) { | ||
fs.symlinkSync(appNodeModulesPath, erbNodeModulesPath, 'junction'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [electron-react-boilerplate, amilajack] | ||
patreon: amilajack | ||
open_collective: electron-react-boilerplate-594 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
name: Bug report | ||
about: You're having technical issues. 🐞 | ||
labels: 'bug' | ||
--- | ||
|
||
<!-- Please use the following issue template or your issue will be closed --> | ||
|
||
## Prerequisites | ||
|
||
<!-- If the following boxes are not ALL checked, your issue is likely to be closed --> | ||
|
||
- [ ] Using npm | ||
- [ ] Using an up-to-date [`main` branch](https://github.com/electron-react-boilerplate/electron-react-boilerplate/tree/main) | ||
- [ ] Using latest version of devtools. [Check the docs for how to update](https://electron-react-boilerplate.js.org/docs/dev-tools/) | ||
- [ ] Tried solutions mentioned in [#400](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400) | ||
- [ ] For issue in production release, add devtools output of `DEBUG_PROD=true npm run build && npm start` | ||
|
||
## Expected Behavior | ||
|
||
<!--- What should have happened? --> | ||
|
||
## Current Behavior | ||
|
||
<!--- What went wrong? --> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- Add relevant code and/or a live example --> | ||
<!-- Add stack traces --> | ||
|
||
1. | ||
|
||
2. | ||
|
||
3. | ||
|
||
4. | ||
|
||
## Possible Solution (Not obligatory) | ||
|
||
<!--- Suggest a reason for the bug or how to fix it. --> | ||
|
||
## Context | ||
|
||
<!--- How has this issue affected you? What are you trying to accomplish? --> | ||
<!--- Did you make any changes to the boilerplate after cloning it? --> | ||
<!--- Providing context helps us come up with a solution that is most useful in the real world --> | ||
|
||
## Your Environment | ||
|
||
<!--- Include as many relevant details about the environment you experienced the bug in --> | ||
|
||
- Node version : | ||
- electron-react-boilerplate version or branch : | ||
- Operating System and version : | ||
- Link to your project : | ||
|
||
<!--- | ||
❗️❗️ Also, please consider donating (https://opencollective.com/electron-react-boilerplate-594) ❗️❗️ | ||
Donations will ensure the following: | ||
🔨 Long term maintenance of the project | ||
🛣 Progress on the roadmap | ||
🐛 Quick responses to bug reports and help requests | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Question | ||
about: Ask a question.❓ | ||
labels: 'question' | ||
--- | ||
|
||
## Summary | ||
|
||
<!-- What do you need help with? --> | ||
|
||
<!--- | ||
❗️❗️ Also, please consider donating (https://opencollective.com/electron-react-boilerplate-594) ❗️❗️ | ||
Donations will ensure the following: | ||
🔨 Long term maintenance of the project | ||
🛣 Progress on the roadmap | ||
🐛 Quick responses to bug reports and help requests | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Feature request | ||
about: You want something added to the boilerplate. 🎉 | ||
labels: 'enhancement' | ||
--- | ||
|
||
<!--- | ||
❗️❗️ Also, please consider donating (https://opencollective.com/electron-react-boilerplate-594) ❗️❗️ | ||
Donations will ensure the following: | ||
🔨 Long term maintenance of the project | ||
🛣 Progress on the roadmap | ||
🐛 Quick responses to bug reports and help requests | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
requiredHeaders: | ||
- Prerequisites | ||
- Expected Behavior | ||
- Current Behavior | ||
- Possible Solution | ||
- Your Environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- discussion | ||
- security | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '44 16 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
Oops, something went wrong.