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

Create packaging for software not on npm registry #150

Open
calumapplepie opened this issue Apr 29, 2020 · 2 comments
Open

Create packaging for software not on npm registry #150

calumapplepie opened this issue Apr 29, 2020 · 2 comments

Comments

@calumapplepie
Copy link

I am currently looking at packaing bitwarden, a graphical, open-source password manager. The team at bitwarden packaged using Node.js packaging, but for some reason chose not to put their package in the node repositories. I am also filing a bug there, to ask them to move it online, but in the meantime I was wondering if support for local depositories could be added.

I tried reading your manpages, which were very sparse (I am also interested in fixing those up: you don't have any documentation for your subcommands). In the end, I cracked open the source, and noticed that you support passing in a local package.json file, but when I tried it, it still attempted to download from the npm website: and it still failed.

I took a peek inside download(), and although my python is not the best, I think it could reasonably be patched to use a local copy instead of trying to grab from the NPM site. I am definitely interested in doing this: I just figured I should inform you of my approach before trying it.

My idea is to let node-module be a directory. That would mean adding a new case to read_package_info(): with the conditional being os.path.isdir(), and then doing as the os.path.isfile() case does. Further, download() would need to be patched to not download. My thoughts on that were that it might be best if I prevented download() from being called if name_is == dir, rather than editing download to have a case in which a download is not done.

Again, I am not the most familiar with python, so you'll want to review my eventual pull request pretty closely. I'll probably be doing the manpage work first, since (a) I need to understand the app before I can mess with it, and (b) I want to make sure other people know how to use the result

@pravi
Copy link
Contributor

pravi commented Apr 29, 2020

For ruby, there is gem2deb similar to npm2deb and dh-make-ruby similar to your idea as commands. I think we can create dh-make-nodejs command which can be run inside a directory. This way we can use the same command to update existing packages when npm2deb has new features.

@calumapplepie
Copy link
Author

calumapplepie commented Apr 29, 2020 via email

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

No branches or pull requests

2 participants