New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must electron packer be globally installed? #50

Closed
robertmuehsig opened this Issue Nov 12, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@robertmuehsig
Collaborator

robertmuehsig commented Nov 12, 2017

From this comment

You say

"Be aweare that dotnet electonize build require that the electron packer is installed globally via npm."
Using of global node modules is not very good idea. User should not be able to run commands as root.
For what purpose u use global node modules? Just because u can do it?
Can u just use node_modules folder from project?

Currently we assume that electron packer is installed globally and under Windows we even just install it globally.

From the electron packer page:

This module requires Node.js 4.0 or higher to run.

for use in npm scripts

npm install electron-packager --save-dev

for use from cli

npm install electron-packager -g

The question is: Is this needed? I'm not sure, maybe @GregorBiswanger knows more.

@GregorBiswanger

This comment has been minimized.

Show comment
Hide comment
@GregorBiswanger

GregorBiswanger Nov 13, 2017

Member

The electron packer build our Electron.Host project with its own node_modules to the executible electron app. When you install the electron packer into the Electron.Host, your electron app has an unnecessary library. The problem is, you get a bigger file size of your application.

One alternative is, to install this to your ASP.NET Core project. But I dont know, if the people would like a node_modules folder in their ASP.NET project.

Member

GregorBiswanger commented Nov 13, 2017

The electron packer build our Electron.Host project with its own node_modules to the executible electron app. When you install the electron packer into the Electron.Host, your electron app has an unnecessary library. The problem is, you get a bigger file size of your application.

One alternative is, to install this to your ASP.NET Core project. But I dont know, if the people would like a node_modules folder in their ASP.NET project.

@robertmuehsig

This comment has been minimized.

Show comment
Hide comment
@robertmuehsig

robertmuehsig Nov 13, 2017

Collaborator

So, this line is needed:

 ProcessHelper.CmdExecute("npm install electron-packager --global", tempPath);

and we can't use:

 ProcessHelper.CmdExecute("npm install electron-packager", tempPath);

right?

Collaborator

robertmuehsig commented Nov 13, 2017

So, this line is needed:

 ProcessHelper.CmdExecute("npm install electron-packager --global", tempPath);

and we can't use:

 ProcessHelper.CmdExecute("npm install electron-packager", tempPath);

right?

@GregorBiswanger

This comment has been minimized.

Show comment
Hide comment
@GregorBiswanger

GregorBiswanger Nov 15, 2017

Member

Mhhh.. we can use the tempPath (Obj folder?).. but we need a own package.json, not from the ElectronNET.Host...

Member

GregorBiswanger commented Nov 15, 2017

Mhhh.. we can use the tempPath (Obj folder?).. but we need a own package.json, not from the ElectronNET.Host...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment