apache / apache/cordova-electron

Cordova flag --buildConfig does not seem to work

Open
#159 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
135
Forks
60
Avg merge
1d 6h
Merged PRs (30d)
5

Description

# Bug Report

## Problem
`cordova build` command does not accept `--buildConfig` flag for electron
```
--buildConfig....................... Use the specified build configuration
instead of default build.json
```
https://cordova.apache.org/docs/en/latest/reference/cordova-cli/#cordova-build-command

### What is expected to happen?
The configuration must be loaded from the given config file.

### What does actually happen?
```
user@pc ~ % cordova build electron --buildConfig=buildConfig.json --release
Cannot find module 'buildConfig.json'
```

## Information

### Command or Code

Create a file named `buildConfig.json` and put all build flags in that file, remove `build.json` if any. Run the following commands
```
cordova platform add electron@nightly
cordova build electron --buildConfig=buildConfig.json --release
```

### Environment, Platform, Device

Environment : MacOS
Platform : Cordova Electron building for Mac and windows on Mac

### Version information

OS : MacOS 10.15.5
Cordova : 9.0.0 (cordova-lib@9.0.1)
Cordova-electron : nightly build

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with cordova platform add electron@nightly and cordova build electron --buildConfig=buildConfig.json --release. Trace the cordova build command's Electron handling of the buildConfig argument and compare it with the documented --buildConfig behavior. Done means the specified buildConfig.json is loaded instead of being treated as a module name.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.