Closed bobvanderlinden closed 8 years ago
can you sumamrize the steps required going from this repo to an npm machinetalk-protobuf module (shell script or Makefile)?
I've gone ahead and build the package, since I needed it for node-machinetalk anyway. You can find it here: https://github.com/bobvanderlinden/machinetalk-protobuf-node
I pulled in the .proto files using git subtree, like Machinekit does as well. I'm not sure whether this is the way to go, but it works alright. Client libraries won't are not affected by this.
https://github.com/bobvanderlinden/machinetalk-protobuf-node/blob/master/scripts/install.js is called to generate the .js files using protobuf upon 'installing' or publishing the library.
I've also published it on npmjs, so that it's easy to use from node-machinetalk. https://www.npmjs.com/package/machinetalk-protobuf
You can see how it is used in node-machinekit here: https://github.com/bobvanderlinden/node-machinetalk/commit/ea914f22e60f0f87bf73c6600f61db9f002de5b1
Has been merged https://github.com/machinekit/machinetalk-protobuf/pull/48
Usually for NodeJS projects a library is installed using
npm install {package}
. It would be nice if the same could be done for machinetalk-protobuf (npm install machinetalk-protobuf
). That way I can depend on the package in node-machinetalk, which in turn makes it possible tonpm install node-machinetalk
or something similar.This makes it easier for people to adopt the library and should make it easier to contribute as well.