Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.
Merged
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
15 changes: 8 additions & 7 deletions .erb/configs/webpack.config.main.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ 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 Dotenv from 'dotenv-webpack';
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';

import baseConfig from './webpack.config.base';
import CheckNodeEnv from '../scripts/CheckNodeEnv';
import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
import Dotenv from 'dotenv-webpack';

CheckNodeEnv('production');
DeleteSourceMaps();
Expand Down Expand Up @@ -46,11 +47,11 @@ export default merge(baseConfig, {
},

plugins: [
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
openAnalyzer: process.env.OPEN_ANALYZER === 'true',
}),
// new BundleAnalyzerPlugin({
// analyzerMode:
// process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
// openAnalyzer: process.env.OPEN_ANALYZER === 'true',
// }),

/**
* Create global constants which can be configured at compile time.
Expand Down
84 changes: 42 additions & 42 deletions .erb/configs/webpack.config.renderer.dev.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,48 +103,48 @@ export default merge(baseConfig, {
],
},
// SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'sass-loader',
},
],
},
// SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
loader: 'style-loader',
},
{
loader: '@teamsupercell/typings-for-css-modules-loader',
},
{
loader: 'css-loader',
options: {
modules: {
localIdentName: '[name]__[local]__[hash:base64:5]',
},
sourceMap: true,
importLoaders: 1,
},
},
{
loader: 'sass-loader',
},
],
},
// {
// test: /\.global\.(scss|sass)$/,
// use: [
// {
// loader: 'style-loader',
// },
// {
// loader: 'css-loader',
// options: {
// sourceMap: true,
// },
// },
// {
// loader: 'sass-loader',
// },
// ],
// },
// // SASS support - compile all other .scss files and pipe it to style.css
// {
// test: /^((?!\.global).)*\.(scss|sass)$/,
// use: [
// {
// loader: 'style-loader',
// },
// {
// loader: '@teamsupercell/typings-for-css-modules-loader',
// },
// {
// loader: 'css-loader',
// options: {
// modules: {
// localIdentName: '[name]__[local]__[hash:base64:5]',
// },
// sourceMap: true,
// importLoaders: 1,
// },
// },
// {
// loader: 'sass-loader',
// },
// ],
// },
{
test: /\.less$/,
use: [
Expand Down
17 changes: 9 additions & 8 deletions .erb/configs/webpack.config.renderer.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import path from 'path';
import webpack from 'webpack';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
// import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import { merge } from 'webpack-merge';
import TerserPlugin from 'terser-webpack-plugin';
import Dotenv from 'dotenv-webpack';

import baseConfig from './webpack.config.base';
import CheckNodeEnv from '../scripts/CheckNodeEnv';
import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
Expand Down Expand Up @@ -152,7 +153,7 @@ export default merge(baseConfig, {
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
// new CssMinimizerPlugin(),
],
},

Expand Down Expand Up @@ -180,10 +181,10 @@ export default merge(baseConfig, {
filename: 'style.css',
}),

new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
openAnalyzer: process.env.OPEN_ANALYZER === 'true',
}),
// new BundleAnalyzerPlugin({
// analyzerMode:
// process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
// openAnalyzer: process.env.OPEN_ANALYZER === 'true',
// }),
],
});
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.
19 changes: 8 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Publish

on:
push:
branches:
- master
on: [push, pull_request]

jobs:
publish:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ macos-latest ]
os: [macos-latest]

steps:
- name: Checkout git repo
Expand All @@ -20,7 +17,7 @@ jobs:
- name: Install Node, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 15
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -33,12 +30,11 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
yarn install --prefer-offline

- name: Install dependencies
run: |
yarn install

- name: Publish releases
env:
# These values are used for auto updates signing
Expand All @@ -52,5 +48,6 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
GA_UACODE: ${{ secrets.GA_UACODE }}
run: |
yarn postinstall && yarn build && yarn electron-builder --publish always --win --linux
# --mac
yarn postinstall
yarn build
yarn electron-builder --publish always --win --linux
16 changes: 4 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir src",
"lint": "cross-env NODE_ENV=development eslint . --cache --ext .js,.jsx,.ts,.tsx",
"package": "npm run build && electron-builder build --publish never",
"postinstall": "node -r @babel/register .erb/scripts/CheckNativeDep.js && electron-builder install-app-deps && yarn cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.babel.js && opencollective-postinstall && yarn-deduplicate yarn.lock",
"postinstall": "node -r @babel/register .erb/scripts/CheckNativeDep.js && electron-builder install-app-deps && yarn cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.babel.js && yarn-deduplicate yarn.lock",
"start": "node -r @babel/register ./.erb/scripts/CheckPortInUse.js && cross-env yarn start:renderer",
"start:main": "cross-env NODE_ENV=development electron -r ./.erb/scripts/BabelRegister ./src/main.dev.ts",
"start:renderer": "cross-env NODE_ENV=development webpack serve --config ./.erb/configs/webpack.config.renderer.dev.babel.js",
Expand Down Expand Up @@ -118,7 +118,7 @@
"testURL": "http://localhost/",
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.erb/mocks/fileMock.js",
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
"\\.(css|less|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"js",
Expand Down Expand Up @@ -177,13 +177,11 @@
"babel-loader": "^8.2.2",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist-config-erb": "^0.0.1",
"chalk": "^4.1.0",
"concurrently": "^5.3.0",
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"css-loader": "^5.0.1",
"css-minimizer-webpack-plugin": "^2.0.0",
"detect-port": "^1.3.0",
"dotenv-webpack": "^7.0.3",
"electron": "19.0.0",
Expand Down Expand Up @@ -211,20 +209,16 @@
"jest": "^27.0.6",
"lint-staged": "^10.2.11",
"mini-css-extract-plugin": "^1.3.1",
"node-sass": "^5.0.0",
"opencollective-postinstall": "^2.0.3",
"prettier": "^2.0.5",
"react-refresh": "^0.9.0",
"rimraf": "^3.0.0",
"sass-loader": "^10.1.0",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.0.3",
"typescript": "^4.3.5",
"url-loader": "^4.1.0",
"webpack": "^5.5.1",
"webpack-bundle-analyzer": "^4.1.0",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.2",
"webpack-dev-server": "3.11.3",
"webpack-merge": "^5.4.0",
"yarn-deduplicate": "^3.1.0"
},
Expand All @@ -233,7 +227,6 @@
"@ant-design/icons": "4.7.0",
"@sentry/electron": "2.5.0",
"antd": "4.21.3",
"caniuse-lite": "1.0.30001214",
"clsx": "^1.1.1",
"date-fns": "2.20.1",
"electron-debug": "3.2.0",
Expand All @@ -258,11 +251,10 @@
"uuid": "^8.3.2"
},
"devEngines": {
"node": ">=14.x",
"node": ">=16.x",
"npm": ">=6.x",
"yarn": ">=1.21.3"
},
"browserslist": [],
"prettier": {
"overrides": [
{
Expand Down
Loading