Contrary to common belief, npm does not stand for "node package manager". In fact it is a package make installer, which just happens to be written in node. Hence it is not only meant to be used for node (or iojs) modules. It is also great for command-line tools written in Ruby!
Via rubygems:
$ gem install nem
The nem utility used to be published on npm also. Please note that this is not the case anymore and the current nem package is part of another project.
- Build your Ruby CLI gem as usual
- Don't use any dependencies (other than included in Ruby's standard library)
- Write your gemspec (example: nem.gemspec)
- Run the following command to generate a
package.json
file:
$ nem
- Optional: Command-line arguments to
nem
will be interpreted as keywords for npm's search - That's it. Only step left: Publish it on the rubygems & npm public registries
Instructions. In short:
$ npm install .
Instructions. In short:
$ gem build *.gemspec
$ gem install *.gem
(replace * with the actual gem name)
Instructions. In short:
$ npm publish .
Instructions. In short:
$ gem build *.gemspec
$ gem push *.gem
(replace * with the actual gem name)
nem is relaesed under the MIT license. npm is © npm, Inc. nem is not affiliated with npm in any way.