Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

using electron-compile and a forked child node process, passing parameters to compiled js #304

Description

@ddombrowsky

I have a system that works perfectly with "compiled" javascript code, as done by electron-forge. It does exactly what I need.

Then I needed to fork a new process. This means I can't just point it to the javascript file that I want to run, because that's compiled and in the .cache directory. I can't just re-launch es6-shim.js, because that is hardcoded to launch the application in package.json. I've resorted to copying in the raw js files, which kinda defeats the purpose of pre-compiling

How can I accomplish this? I've launching the child process with script:

const electronCompile = require('electron-compile');
const c = electronCompile.init(__dirname, 'child.js');

but c is undefined and I can't use it as I would a require-d object. I can't figure out how to pass parameters into the newly minted process and call a js file that has been pre-compiled.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions