Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplification and Cleanup #39

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .erb/configs/webpack.config.main.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
CheckNodeEnv('production');
DeleteSourceMaps();

const devtoolsConfig = process.env.DEBUG_PROD === 'true' ? {
devtool: 'source-map'
} : {};
const devtoolsConfig =
process.env.DEBUG_PROD === 'true'
? {
devtool: 'source-map',
}
: {};

export default merge(baseConfig, {
...devtoolsConfig,
Expand All @@ -37,7 +40,7 @@ export default merge(baseConfig, {
new TerserPlugin({
parallel: true,
}),
]
],
},

plugins: [
Expand Down
24 changes: 12 additions & 12 deletions .erb/configs/webpack.config.renderer.dev.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ const requiredByDLLConfig = module.parent.filename.includes(
/**
* Warn if the DLL is not built
*/
if (!requiredByDLLConfig && !(fs.existsSync(dllDir) && fs.existsSync(manifest))) {
if (
!requiredByDLLConfig &&
!(fs.existsSync(dllDir) && fs.existsSync(manifest))
) {
console.log(
chalk.black.bgYellow.bold(
'The DLL files are missing. Sit back while we build them for you with "yarn build-dll"'
Expand Down Expand Up @@ -61,9 +64,7 @@ export default merge(baseConfig, {
{
loader: require.resolve('babel-loader'),
options: {
plugins: [
require.resolve('react-refresh/babel'),
].filter(Boolean),
plugins: [require.resolve('react-refresh/babel')].filter(Boolean),
},
},
],
Expand Down Expand Up @@ -211,7 +212,6 @@ export default merge(baseConfig, {
],
},
plugins: [

requiredByDLLConfig
? null
: new webpack.DllReferencePlugin({
Expand Down Expand Up @@ -272,13 +272,13 @@ export default merge(baseConfig, {
},
before() {
console.log('Starting Main Process...');
spawn('npm', ['run', 'start:main'], {
shell: true,
env: process.env,
stdio: 'inherit',
})
.on('close', (code) => process.exit(code))
.on('error', (spawnError) => console.error(spawnError));
spawn('npm', ['run', 'start:main'], {
shell: true,
env: process.env,
stdio: 'inherit',
})
.on('close', (code) => process.exit(code))
.on('error', (spawnError) => console.error(spawnError));
},
},
});
24 changes: 13 additions & 11 deletions .erb/configs/webpack.config.renderer.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
CheckNodeEnv('production');
DeleteSourceMaps();

const devtoolsConfig = process.env.DEBUG_PROD === 'true' ? {
devtool: 'source-map'
} : {};
const devtoolsConfig =
process.env.DEBUG_PROD === 'true'
? {
devtool: 'source-map',
}
: {};

export default merge(baseConfig, {
...devtoolsConfig,
Expand Down Expand Up @@ -52,7 +55,7 @@ export default merge(baseConfig, {
},
},
'css-loader',
'sass-loader'
'sass-loader',
],
},
// WOFF Font
Expand Down Expand Up @@ -125,13 +128,12 @@ export default merge(baseConfig, {

optimization: {
minimize: true,
minimizer:
[
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
],
minimizer: [
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
],
},

plugins: [
Expand Down
Binary file removed .erb/img/erb-banner.png
Binary file not shown.
Binary file removed .erb/img/erb-logo.png
Binary file not shown.
Binary file removed .erb/img/eslint-padded-90.png
Binary file not shown.
Binary file removed .erb/img/eslint-padded.png
Binary file not shown.
Binary file removed .erb/img/eslint.png
Binary file not shown.
Binary file removed .erb/img/jest-padded-90.png
Binary file not shown.
Binary file removed .erb/img/jest-padded.png
Binary file not shown.
Binary file removed .erb/img/jest.png
Binary file not shown.
Binary file removed .erb/img/js-padded.png
Binary file not shown.
Binary file removed .erb/img/js.png
Binary file not shown.
Binary file removed .erb/img/npm.png
Binary file not shown.
Binary file removed .erb/img/react-padded-90.png
Binary file not shown.
Binary file removed .erb/img/react-padded.png
Binary file not shown.
Binary file removed .erb/img/react-router-padded-90.png
Binary file not shown.
Binary file removed .erb/img/react-router-padded.png
Binary file not shown.
Binary file removed .erb/img/react-router.png
Binary file not shown.
Binary file removed .erb/img/react.png
Binary file not shown.
Binary file removed .erb/img/webpack-padded-90.png
Binary file not shown.
Binary file removed .erb/img/webpack-padded.png
Binary file not shown.
Binary file removed .erb/img/webpack.png
Binary file not shown.
Binary file removed .erb/img/yarn-padded-90.png
Binary file not shown.
Binary file removed .erb/img/yarn-padded.png
Binary file not shown.
Binary file removed .erb/img/yarn.png
Binary file not shown.
8 changes: 0 additions & 8 deletions .erb/scripts/.eslintrc

This file was deleted.

4 changes: 1 addition & 3 deletions .erb/scripts/CheckBuildsExist.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import chalk from 'chalk';
import fs from 'fs';

const mainPath = path.join(__dirname, '../../src/main.prod.js');
const rendererPath = path.join(
__dirname, '../../src/dist/renderer.prod.js'
);
const rendererPath = path.join(__dirname, '../../src/dist/renderer.prod.js');

if (!fs.existsSync(mainPath)) {
throw new Error(
Expand Down
4 changes: 3 additions & 1 deletion .erb/scripts/Notarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ exports.default = async function notarizeMacos(context) {
}

if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) {
console.warn('Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set');
console.warn(
'Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set'
);
return;
}

Expand Down
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ module.exports = {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./.erb/configs/webpack.config.eslint.js'),
config: {
rules: {
'no-console': 'off',
'global-require': 'off',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
},
},
'import/parsers': {
Expand Down
67 changes: 0 additions & 67 deletions .github/ISSUE_TEMPLATE/1-Bug_report.md

This file was deleted.

19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/2-Question.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/3-Feature_request.md

This file was deleted.

58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '35 15 * * 4'

Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v1
# 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@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
Loading