electron-userland / electron-userland/electron-webpack
How to contribute?
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I've changed my **installed** version of electron-webpack to make the `customTemplateFile ` variable configurable (edited some .js files).
Now I would like to contribute, i.e. change the **forked** version of electron-webpack (edit some .ts files) and kinda build it, then create a PR.
Could you guide me through the steps for contributing?
---
Edit: actual list of changes I've done:
`node_modules\electron-webpack\out\main.js`
```diff
@@ -257,6 +257,8 @@
this.sourceDir = this.getSourceDirectory(this.type);
const commonSourceDirectory = this.electronWebpackConfiguration.commonSourceDirectory;
this.commonSourceDirectory = commonSourceDirectory == null ? path.join(this.projectDir, "src", "common") : path.resolve(this.projectDir, commonSourceDirectory);
+ const customTemplateFile = this.electronWebpackConfiguration.customTemplateFile;
+ this.customTemplateFile = customTemplateFile == null ? "src/index.ejs" : path.resolve(this.projectDir, customTemplateFile);
}
get config() {
@@ -486,11 +488,13 @@
}
const projectDir = (env.configuration || {}).projectDir || process.cwd();
+ const customTemplateFile = (env.configuration || {}).customTemplateFile || 'src/index.ejs';
const packageMetadata = yield (0, _util().orNullIfFileNotExist)((0, _fsExtraP().readJson)(path.join(projectDir, "package.json")));
const electronWebpackConfig = ((yield (0, _readConfigFile().getConfig)({
packageKey: "electronWebpack",
configFilename: "electron-webpack",
projectDir,
+ customTemplateFile,
packageMetadata: new (_lazyVal().Lazy)(() => Promise.resolve(packageMetadata))
})) || {}).result || {};
```
`node_modules\electron-webpack\scheme.json`
```diff
@@ -127,6 +127,12 @@
"string"
]
},
+ "customTemplateFile": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"renderer": {
"anyOf": [
{
```
`node_modules\electron-webpack\out\targets\RendererTarget.js`
```diff
@@ -273,8 +273,7 @@
var _this2 = this;
return (0, _bluebirdLst().coroutine)(function* () {
- // not configurable for now, as in the electron-vue
- const customTemplateFile = path.join(configurator.projectDir, "src/index.ejs");
+ const customTemplateFile = configurator.customTemplateFile;
const HtmlWebpackPlugin = require("html-webpack-plugin");
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.