-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: convert Forge and Webpack config to TypeScript (#1406)
* build: convert Forge and Webpack config to TypeScript * fix: yarn electron-releases on Windows
- Loading branch information
1 parent
7cf08bf
commit 7226571
Showing
12 changed files
with
202 additions
and
95 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"homepage": "https://electronjs.org/fiddle", | ||
"main": "./.webpack/main", | ||
"scripts": { | ||
"contributors": "node ./tools/contributors.js", | ||
"contributors": "ts-node ./tools/contributors.ts", | ||
"lint:style": "stylelint \"./src/less/*.less\"", | ||
"lint:ts": "eslint \"./**/*.{ts,tsx}\"", | ||
"lint:js": "eslint \"./**/*.js\"", | ||
|
@@ -24,7 +24,7 @@ | |
"test:ci": "jest --ci --config=jest.json --coverage --runInBand --reporters=jest-junit", | ||
"test:report": "jest --config=jest.json --json --bail=false --outputFile=report.json | true", | ||
"tsc": "tsc --noEmit -p .", | ||
"electron-releases": "node --unhandled-rejections=strict ./tools/fetch-releases.js", | ||
"electron-releases": "node --unhandled-rejections=strict -r ts-node/register ./tools/fetch-releases.ts", | ||
"postinstall": "husky install && npm run electron-releases" | ||
}, | ||
"keywords": [ | ||
|
@@ -35,7 +35,7 @@ | |
"author": "Felix Rieseberg <[email protected]>", | ||
"license": "MIT", | ||
"config": { | ||
"forge": "./forge.config.js" | ||
"forge": "./forge.config.ts" | ||
}, | ||
"dependencies": { | ||
"@blueprintjs/core": "^3.36.0", | ||
|
@@ -144,6 +144,7 @@ | |
"terser-webpack-plugin": "^5.3.3", | ||
"ts-jest": "^29.1.1", | ||
"ts-loader": "^9.4.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.1.6", | ||
"webpack": "^5.69.1" | ||
}, | ||
|
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
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,14 @@ | ||
import type IForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; | ||
import { ProvidePlugin } from 'webpack'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
export const plugins = [ | ||
new ForkTsCheckerWebpackPlugin({ | ||
logger: 'webpack-infrastructure', | ||
}), | ||
new ProvidePlugin({ | ||
__importStar: ['tslib', '__importStar'], | ||
}), | ||
]; |
4 changes: 3 additions & 1 deletion
4
tools/webpack/common/webpack.rules.js → tools/webpack/common/webpack.rules.ts
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
11 changes: 6 additions & 5 deletions
11
tools/webpack/webpack.main.config.js → tools/webpack/webpack.main.config.ts
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
11 changes: 6 additions & 5 deletions
11
tools/webpack/webpack.renderer.config.js → tools/webpack/webpack.renderer.config.ts
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
Oops, something went wrong.