Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Is there an option which support to run some custom scripts before launching the app? #1554

Open
5 tasks done
northwang-luckyopened this issue Jul 27, 2023 · 2 comments
Open
5 tasks done
Labels

Comments

@northwang-lucky
Copy link

Homework

Your question

Is there an option which support to run some custom scripts before launching the app in electron?

Such as:

nativefier --hooks-before-launching./pre-script.js http://xxx
//./pre-script.js
exportdefaultfunction(tools){
tools.exec('echo "Hello World" ')
}

Steps to reproduce

nativefier --verbose --some-option https://mysite
<paste your verbose build logs, if relevant to your question>

Debug info

No response

Nativefier version

50.1.1

Node.js version

16.20.0

npm version

8.19.4

OS

MacOS Ventura 13.4.1

@danieltomasz
Copy link

I don't know about nativifier but multi supports customs js
https://github /kofigumbs/multi

@gingerbeardman
Copy link

gingerbeardman commented Aug 26, 2023

use the--injectoption to inject user styles or scripts. of course these will run early in the app/window lifecycle, not before the app.

if you want it before the app runs, then you need to DIY for obvious reasons, maybe you can do them in a shell script at the end of which youopen Your.app

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants