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

Feature Request: Make project a global NPM package with cli #9

Closed
Brekmister opened this issue Oct 11, 2017 · 6 comments
Closed

Feature Request: Make project a global NPM package with cli #9

Brekmister opened this issue Oct 11, 2017 · 6 comments
Assignees
Labels
feature request something new to be implemented

Comments

@Brekmister
Copy link
Contributor

Brekmister commented Oct 11, 2017

There are several advantages of this:

  1. Configuration - set the App ID, mongo DB credentials and host (and verify these are valid)
  2. Start detached or daemonize it
  3. Unified cli command: 'multicast ...'
  4. 'npm install -g multicast' boom done

Point being, This is where I think multicast should go. I can probably get started on a thing this weekend to merge in. No guarantees though.

@Brekmister Brekmister changed the title Feature Request: Make project a global NPM package with cli. Feature Request: Make project a global NPM package with cli Oct 11, 2017
@superhawk610 superhawk610 self-assigned this Oct 11, 2017
@superhawk610 superhawk610 added the feature request something new to be implemented label Oct 11, 2017
@superhawk610
Copy link
Owner

Good idea. I'll work on this since I'll have to register the package through NPM.

@superhawk610
Copy link
Owner

Currently waiting to hear back from the owners of multicast on NPM.

superhawk610 added a commit that referenced this issue Oct 11, 2017
- added new preset channel listing when adding a new channel
- upped font size for alerts (addresses #12)
- conditionally includes Google's cast script only when displayed on receiver device (addresses #1)
- added --serve-only flag to prevent interrupting devices while debugging
- added multicast bin to package.json to simplify startup and prepare for NPM (see #9)
- added new features to README
- cleaned up code formatting
superhawk610 added a commit that referenced this issue Oct 13, 2017
- bump major version
- multicast can now be installed as a global NPM package (addresses #9)
- added explanation when run with no arguments
- added config interface for initial setup
- check if cast is defined before referencing in client.js
@superhawk610
Copy link
Owner

Package is now available for install here via NPM. Let me know how it works for everyone.
Daemonized/detached function is the last piece to implement before closing this issue.

@Brekmister
Copy link
Contributor Author

Brekmister commented Oct 13, 2017

Welp, I found an issue with installing via NPM.

When you are doing global NPM install, I don't think its a good idea to be using Gulp.

> multicast@1.0.0 postinstall /usr/lib/node_modules/multicast
> gulp

module.js:471
    throw err;
    ^

Error: Cannot find module 'gulp-uglify-es'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/multicast/gulpfile.js:2:46)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

@superhawk610
Copy link
Owner

You could be right about avoiding Gulp, but I don't think that's the cause of the error. I added a potential fix for this in the README:

Can't launch after installing via NPM?

Make sure your NODE_PATH environment variable correctly includes the global store for node dependencies. On Linux:

export NODE_PATH=/opt/lib/node_modules

@Brekmister
Copy link
Contributor Author

Sweet Deal. There are some other features I would like to add to the CLI but, for right now, this issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request something new to be implemented
Projects
None yet
Development

No branches or pull requests

2 participants