Skip to content
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

Put a launcher script in bin #20

Closed
erkyrath opened this issue Feb 5, 2016 · 4 comments
Closed

Put a launcher script in bin #20

erkyrath opened this issue Feb 5, 2016 · 4 comments

Comments

@erkyrath
Copy link
Owner

erkyrath commented Feb 5, 2016

Might as well be Node about this, even though most people will only use the packaged apps.

@erkyrath
Copy link
Owner Author

erkyrath commented Feb 5, 2016

@erkyrath
Copy link
Owner Author

erkyrath commented Feb 8, 2016

I poked at this for a while, but I don't understand enough about node's install system. It's clear how to list a bin script in the package.json, but it's not clear how to write the script so that it launches the thing.

This works from the command line (assuming you've gotten npm start working to begin with):

    $SRCDIR/lectrote/node_modules/.bin/electron $SRCDIR/lectrote/main.js

@curiousdannii
Copy link
Contributor

I'm pretty sure there isn't any requirement that it be a js file... you should be able to put a shell script in bin.

You should move electron to be a dependency rather than just a dev dependency.

Probably most people will only use the packaged apps, but with this set up, you would be able to install it through npm install -g lectrote (if you also published it to npm of course.)

@erkyrath
Copy link
Owner Author

erkyrath commented Feb 8, 2016

"You should move electron to be a dependency rather than just a dev dependency."

Aha, thanks. I think this was the bit I was missing in my experiments.

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

No branches or pull requests

2 participants