obs-tablet-remote icon indicating copy to clipboard operation
obs-tablet-remote copied to clipboard

Publish on NPM

Open marklagendijk opened this issue 4 years ago • 2 comments

It would be really nice to also publish this package on npm. I thought a bit about how to make the npm publication most useful.

  1. Exclude the source, include the build result.
  2. People can install the package and host the contents using any webserver they want.
  3. Add instructions on how to run the package via http-server. If you need help with any of this, I can help.

marklagendijk avatar Mar 20 '20 19:03 marklagendijk

I don't think npm is really made for this since npm is more about libraries and other code that can be reused in other projects while this is just an application that can be served (as a static site, even with just apache/nginx). Maybe having builds output a version that can be downloaded, either from build artifacts (if they're publicly available?) or I guess separate release (kinda bad at making defined versions here since practically whatever is current repo state is latest version)

t2t2 avatar Mar 22 '20 12:03 t2t2

NPM is made for many things. Publishing full applications is one of them. When you're installing a package you can also choose to install it globally. Usually these would be tools that you can run via the CLI.

I think I would do something like this:

  1. Move all current dependencies to devDependencies (since they are only needed for building).
  2. Add http-server as a dependency.
  3. Add obs-tablet-remote or obs-tablet-remote-server under bin of package.json, with a command that calls http-server.

That way people can do:

  1. npm install -g obs-tablet-remote
  2. obs-tablet-remote --port 8080

marklagendijk avatar Mar 23 '20 10:03 marklagendijk