Open drakkhen opened 2 years ago
Thank you for your interest in the project!
Since I'm tinkering with this plugin, I'd like to use my fork as the source on my own Homebridge instance. But when I did
sudo npm install -g github:drakkhen/homebridge-volvo
on my pi the plugin did not work at all. It installed without any explicit errors but the/usr/lib/node_modules/homebridge-volvo
directory did not contain adist/
directory
This is expected behavior. AFAIK, the dist
folder is not part of the package layout -- only an intermediate staging directory for packaging / "compiled" code locally. My guess is that the files you saw were originally from the root of the dist
folder when I built the package.
I'm totally at a loss as to what magic duct-tape didn't fire off to make my github-based-npm-install work. I simply forked the repo and make a few tiny changes, but I don't get why the build process would be affected.
It happens to the best of us! You should be able to get it up and running by
sudo npm install -g typescript
npm install
npm run dev
npm run dev
is a custom build command, which executes the following: npm run build && DEBUG=* /usr/bin/node --inspect-brk /usr/bin/homebridge -P $PWD -D
. It launches homebridge, instructing it to look for plugins in $PWD
, and break before execution.
You can then attach chrome to step though your code.
Feel free to let me know if you have any further questions 😄
Ah, so when you make a release and push it to npm, does the npm server-side service read the package.json file to see what needs to run to make a build (scripts.publish_only
's value, I assume), then create the dist/ directory on their side, and then when users run npm install homebridge-volvo
simply copies the pre-built dist/ folder over?
As for dev... oh wow that sounds a LOT better than what I have been doing -- definitely looking forward to trying that out!
@trympet: I realize this is WELL outside the scope of this particular project, and forgive me for creating a separate "Issue", but I figured that might be the most appropriate method..
I'm a grey-bearded Javascript (and other languages) developer. I only really understand traditional in-browser javascript, but I'm trying to to get up to speed on modern JS/TS development. There's a lot (LOT) to learn!
Since I'm tinkering with this plugin, I'd like to use my fork as the source on my own Homebridge instance. But when I did
sudo npm install -g github:drakkhen/homebridge-volvo
on my pi the plugin did not work at all. It installed without any explicit errors but the/usr/lib/node_modules/homebridge-volvo
directory did not contain adist/
directory (it hadnode_modules
and a few other files but nothing fromsrc/
). Seems like some post-processing/building did not trigger.I'm totally at a loss as to what magic duct-tape didn't fire off to make my github-based-npm-install work. I simply forked the repo and make a few tiny changes, but I don't get why the build process would be affected.
Do you have any tips or resources that you can link me to so that I can use my fork for final testing before submitting PRs? Thanks!