yarn-run-all
Version:
A CLI tool to run multiple npm-scripts in parallel or sequential.
36 lines (27 loc) • 974 B
JavaScript
/**
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
;
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var Promise = require("pinkie-promise");
var _require = require("read-pkg-up"),
readPkgUp = _require.sync;
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/**
* Print a version text.
*
* @param {stream.Writable} output - A writable stream to print.
* @returns {Promise} Always a fulfilled promise.
* @private
*/
module.exports = function printVersion(output) {
var version = readPkgUp(__dirname).pkg.version;
output.write("v" + version + "\n");
return Promise.resolve(null);
};