MCPcopy
hub / github.com/meteor/meteor / loadHelp

Function loadHelp

tools/cli/main.js:325–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323// - name (entry name, typically a command name)
324// - body (contents of body, trimmed to end with a newline but no blank lines)
325var loadHelp = function () {
326 var dirname = files.convertToStandardPath(__dirname);
327 var raw = files.readFile(files.pathJoin(dirname, 'help.txt'), 'utf8');
328 return _.map(raw.split(/^>>>/m).slice(1), function (r) {
329 var lines = r.split('\n');
330 var name = lines.shift().trim();
331 return {
332 name: name,
333 body: lines.join('\n').replace(/\s*$/, '') + '\n'
334 };
335 });
336};
337
338var longHelp = exports.longHelp = function (commandName) {
339 commandName = commandName.trim();

Callers 1

main.jsFile · 0.85

Calls 2

mapMethod · 0.80
readFileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…