Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed Apr 6, 2020
1 parent 4fd5111 commit a280fe9
Show file tree
Hide file tree
Showing 5 changed files with 693 additions and 650 deletions.
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,32 @@
"format": "prettier --ignore-path ./.gitignore --write '**/*.{css,html,js,json,jsx,less,md,scss,ts,tsx,vue,yaml,yml}'"
},
"dependencies": {
"@svgr/webpack": "^5.3.0",
"@svgr/webpack": "^5.3.1",
"@types/draft-js": "^0.10.36",
"@types/electron-settings": "^3.1.1",
"@types/lodash.debounce": "^4.0.6",
"@types/node": "^12.12.31",
"@types/react": "^16.9.25",
"@types/react-dom": "^16.9.1",
"@types/node": "^13.11.0",
"@types/react": "^16.9.32",
"@types/react-dom": "^16.9.6",
"@types/react-redux": "^7.1.7",
"@types/redux-logger": "^3.0.7",
"@types/semver": "^7.1.0",
"draft-js": "^0.11.3",
"draft-js": "^0.11.5",
"draft-js-list-plugin": "^1.0.2",
"draft-js-plugins-editor": "^3.0.0",
"electron-context-menu": "^0.16.0",
"electron-debug": "^3.0.0",
"electron-log": "^4.1.0",
"electron-log": "^4.1.1",
"electron-md-to-pdf": "^2.2.0",
"electron-settings": "^3.2.0",
"electron-unhandled": "^3.0.1",
"electron-updater": "^4.2.5",
"electron-util": "^0.14.0",
"feather-icons": "^4.26.0",
"feather-icons": "^4.28.0",
"lodash.debounce": "^4.0.8",
"markdown-draft-js": "^2.2.0",
"minireset.css": "^0.0.6",
"minisearch": "^2.1.4",
"minisearch": "^2.2.1",
"moment": "^2.22.2",
"move-file": "^1.2.0",
"react": "^16.13.1",
Expand All @@ -91,12 +91,12 @@
"@samuelmeuli/stylelint-config": "^3.0.0",
"@samuelmeuli/tsconfig": "^1.0.0",
"@types/html-webpack-plugin": "^3.2.2",
"@types/jest": "^25.1.4",
"@types/jest": "^25.2.1",
"@types/license-checker-webpack-plugin": "^0.0.2",
"@types/webpack": "^4.41.5",
"@types/webpack": "^4.41.10",
"@types/webpack-merge": "^4.1.5",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"babel-loader": "^8.1.0",
"cross-env": "^7.0.2",
"css-loader": "^3.4.0",
Expand All @@ -106,13 +106,13 @@
"eslint": "6.8.0",
"eslint-config-airbnb": "18.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.1",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.0.1",
"jest": "^25.1.0",
"html-webpack-plugin": "^4.0.4",
"jest": "^25.2.7",
"license-checker-webpack-plugin": "^0.1.4",
"mockdate": "^2.0.3",
"npm-run-all": "^4.1.3",
Expand All @@ -122,9 +122,9 @@
"serve": "^11.3.0",
"style-loader": "^1.1.2",
"stylelint": "^12.0.1",
"ts-node": "^8.8.1",
"ts-node": "^8.8.2",
"typescript": "^3.8.3",
"webpack": "^4.41.6",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2"
},
Expand Down
14 changes: 9 additions & 5 deletions webpack.base.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import path from "path";

import LicenseCheckerWebpackPlugin from "license-checker-webpack-plugin";
import { Configuration } from "webpack";
import { CliConfigOptions, Configuration } from "webpack";

export default (_: any, argv: Record<string, string>): Configuration => {
const configName = argv.config.split(".")[2];
export default (
_: string | Record<string, boolean | number | string>,
args: CliConfigOptions,
): Configuration => {
const configName = args.config?.split(".")[2];
return {
output: {
path: path.resolve(__dirname, "bundle"),
},
devtool: argv.mode === "production" ? false : "source-map",
devtool: args.mode === "production" ? false : "source-map",
resolve: {
extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
},
Expand All @@ -22,8 +25,9 @@ export default (_: any, argv: Record<string, string>): Configuration => {
},
],
},
// @ts-ignore
plugins: [
...(argv.mode === "production"
...(args.mode === "production"
? [
new LicenseCheckerWebpackPlugin({
allow: "(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR ISC OR MIT OR Zlib)",
Expand Down
10 changes: 7 additions & 3 deletions webpack.main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { Configuration } from "webpack";
import { CliConfigOptions, Configuration } from "webpack";
import merge from "webpack-merge";

import base from "./webpack.base";

export default (_: any, argv: Record<string, string>): Configuration =>
merge(base(_, argv), {
export default (
env: string | Record<string, boolean | number | string>,
args: CliConfigOptions,
): Configuration =>
// @ts-ignore
merge(base(env, args), {
entry: "./src/main/main.ts",
output: {
filename: "main.js",
Expand Down
10 changes: 7 additions & 3 deletions webpack.renderer.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import HtmlWebpackPlugin from "html-webpack-plugin";
import { Configuration } from "webpack";
import { CliConfigOptions, Configuration } from "webpack";
import merge from "webpack-merge";

import pkg from "./package.json";
import base from "./webpack.base";

export default (_: any, argv: Record<string, string>): Configuration =>
merge(base(_, argv), {
export default (
env: string | Record<string, boolean | number | string>,
args: CliConfigOptions,
): Configuration =>
// @ts-ignore
merge(base(env, args), {
entry: "./src/renderer/renderer.tsx",
output: {
filename: "renderer.js",
Expand Down
Loading

0 comments on commit a280fe9

Please sign in to comment.