Rewrite NPM syncer in Ruby