Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Zagrios/bs-manager
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: Zagrios/bs-manager
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 637 changed files with 73,602 additions and 45,543 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ root = true

[*]
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
22 changes: 11 additions & 11 deletions .erb/configs/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"rules": {
"no-console": "off",
"global-require": "off",
"import/no-dynamic-require": "off",
"prettier/prettier": 0,
"no-await-in-loop": "off",
"import/prefer-default-export": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
}
"rules": {
"no-console": "off",
"global-require": "off",
"import/no-dynamic-require": "off",
"prettier/prettier": 0,
"no-await-in-loop": "off",
"import/prefer-default-export": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
}
}
8 changes: 4 additions & 4 deletions .erb/configs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");

module.exports = {
plugins: [tailwindcss, autoprefixer],
};
plugins: [tailwindcss, autoprefixer],
};
94 changes: 53 additions & 41 deletions .erb/configs/webpack.config.base.ts
Original file line number Diff line number Diff line change
@@ -2,52 +2,64 @@
* Base webpack config used across other specific configs
*/

import webpack from 'webpack';
import webpackPaths from './webpack.paths';
import { dependencies as externals } from '../../release/app/package.json';
import webpack from "webpack";
import webpackPaths from "./webpack.paths";
import { dependencies as externals } from "../../release/app/package.json";

function createExternals(): string[] {
const webpackExternals: string[] = [...Object.keys(externals || {})];
const excludedExternals: string[] = [];

if (process.platform === "linux") {
// Linux only uses regedit-rs types
excludedExternals.push("regedit-rs");
}

return webpackExternals.filter(external => !excludedExternals.includes(external));
}

const configuration: webpack.Configuration = {
externals: [...Object.keys(externals || {})],

stats: 'errors-only',

module: {
rules: [
{
test: /\.[jt]sx?$/,
exclude: /node_modules/,
use: {
loader: 'ts-loader',
options: {
// Remove this line to enable type checking in webpack builds
transpileOnly: true,
},
externals: createExternals(),

stats: "errors-only",

module: {
rules: [
{
test: /\.[jt]sx?$/,
exclude: /node_modules/,
use: {
loader: "ts-loader",
options: {
// Remove this line to enable type checking in webpack builds
transpileOnly: true,
},
},
},
],
},

output: {
path: webpackPaths.srcPath,
// https://github.com/webpack/webpack/issues/1114
library: {
type: "commonjs2",
},
},
],
},
},

output: {
path: webpackPaths.srcPath,
// https://github.com/webpack/webpack/issues/1114
library: {
type: 'commonjs2',
/**
* Determine the array of extensions that should be used to resolve modules.
*/
resolve: {
extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
modules: [webpackPaths.srcPath, "node_modules"],
},
},

/**
* Determine the array of extensions that should be used to resolve modules.
*/
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
modules: [webpackPaths.srcPath, 'node_modules'],
},

plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
}),
],

plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: "production",
}),
],
};

export default configuration;
2 changes: 1 addition & 1 deletion .erb/configs/webpack.config.eslint.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* eslint import/no-unresolved: off, import/no-self-import: off */

module.exports = require('./webpack.config.renderer.dev').default;
module.exports = require("./webpack.config.renderer.dev").default;
64 changes: 64 additions & 0 deletions .erb/configs/webpack.config.main.dev.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* 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);
121 changes: 61 additions & 60 deletions .erb/configs/webpack.config.main.prod.ts
Original file line number Diff line number Diff line change
@@ -2,81 +2,82 @@
* Webpack config for production electron main process
*/

import path from 'path';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import TerserPlugin from 'terser-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import deleteSourceMaps from '../scripts/delete-source-maps';
import path from "path";
import webpack from "webpack";
import { merge } from "webpack-merge";
import TerserPlugin from "terser-webpack-plugin";
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
import baseConfig from "./webpack.config.base";
import webpackPaths from "./webpack.paths";
import checkNodeEnv from "../scripts/check-node-env";
import deleteSourceMaps from "../scripts/delete-source-maps";

checkNodeEnv('production');
checkNodeEnv("production");
deleteSourceMaps();

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

const configuration: webpack.Configuration = {
...devtoolsConfig,
...devtoolsConfig,

mode: 'production',
mode: "production",

target: 'electron-main',
target: "electron-main",

entry: {
main: path.join(webpackPaths.srcMainPath, 'main.ts'),
preload: path.join(webpackPaths.srcMainPath, 'preload.ts'),
},
entry: {
main: path.join(webpackPaths.srcMainPath, "main.ts"),
preload: path.join(webpackPaths.srcMainPath, "preload.ts"),
},

output: {
path: webpackPaths.distMainPath,
filename: '[name].js',
},
output: {
path: webpackPaths.distMainPath,
filename: "[name].js",
},

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

plugins: [
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === "true" ? "server" : "disabled",
}),

plugins: [
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
}),
/**
* Create global constants which can be configured at compile time.
*
* Useful for allowing different behaviour between development builds and
* release builds
*
* NODE_ENV should be production so that modules do not perform certain
* development checks
*/
new webpack.EnvironmentPlugin({
NODE_ENV: "production",
DEBUG_PROD: false,
START_MINIMIZED: false,
}),
],

/**
* Create global constants which can be configured at compile time.
*
* Useful for allowing different behaviour between development builds and
* release builds
*
* NODE_ENV should be production so that modules do not perform certain
* development checks
* 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
*/
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
DEBUG_PROD: false,
START_MINIMIZED: false,
}),
],

/**
* 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,
},
node: {
__dirname: false,
__filename: false,
},
};

export default merge(baseConfig, configuration);
Loading