npub
Version:
publishing tool for your node projects hosted on github
11 lines (8 loc) • 312 B
text/coffeescript
fs = require 'fs'
debug = require('debug') 'version'
module.exports = (dir, version) ->
filePath = "#{dir}/package.json"
packageJson = require filePath
debug "updating #{packageJson.version} to #{version}"
packageJson.version = version
fs.writeFileSync filePath, JSON.stringify(packageJson, null, 2)