version.js 681 B

12345678910111213141516171819202122232425
  1. /**
  2. * @author Toru Nagashima
  3. * @copyright 2016 Toru Nagashima. All rights reserved.
  4. * See LICENSE file in root directory for full license.
  5. */
  6. 'use strict'
  7. // ------------------------------------------------------------------------------
  8. // Public Interface
  9. // ------------------------------------------------------------------------------
  10. /**
  11. * Print a version text.
  12. *
  13. * @param {stream.Writable} output - A writable stream to print.
  14. * @returns {Promise} Always a fulfilled promise.
  15. * @private
  16. */
  17. module.exports = function printVersion (output) {
  18. const version = require('../../package.json').version
  19. output.write(`v${version}\n`)
  20. return Promise.resolve(null)
  21. }