Skip to content

Commit

Permalink
feat: do not generate package json while serving
Browse files Browse the repository at this point in the history
  • Loading branch information
bennymeg committed Mar 10, 2022
1 parent 4acace3 commit 209702f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions packages/nx-electron/src/executors/execute/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,19 @@ async function* startBuild(options: ElectronExecuteBuilderOptions, context: Exec
buildTarget,
{
...options.buildTargetOptions,
generatePackageJson: false,
watch: options.watch,
},
context
);
}

function runWaitUntilTargets(
options: ElectronExecuteBuilderOptions,
context: ExecutorContext
): Promise<{ success: boolean }[]> {
function runWaitUntilTargets(options: ElectronExecuteBuilderOptions, context: ExecutorContext): Promise<{ success: boolean }[]> {
return Promise.all(
options.waitUntilTargets.map(async (waitUntilTarget) => {
const target = parseTargetString(waitUntilTarget);
const output = await runExecutor(target, {}, context);

return new Promise<{ success: boolean }>(async (resolve) => {
let event = await output.next();
// Resolve after first event
Expand Down
6 changes: 1 addition & 5 deletions packages/nx-electron/src/utils/generate-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ import { INDEX_OUTPUT_FILENAME } from './config';
* @param options
* @constructor
*/
export function generatePackageJson(
projectName: string,
graph: ProjectGraph,
options: BuildElectronBuilderOptions
) {
export function generatePackageJson(projectName: string, graph: ProjectGraph, options: BuildElectronBuilderOptions) {
// default package.json if one does not exist
let packageJson = {
name: projectName,
Expand Down

0 comments on commit 209702f

Please sign in to comment.