MCPcopy
hub / github.com/plopjs/plop / setGenerator

Function setGenerator

packages/node-plop/src/node-plop.js:64–75  ·  view source on GitHub ↗
(name = "", config = {})

Source from the content-addressed store, hash-verified

62 const getActionType = (name) => actionTypes[name];
63 const getGenerator = (name) => generators[name];
64 function setGenerator(name = "", config = {}) {
65 // if no name is provided, use a default
66 name = name || `generator-${Object.keys(generators).length + 1}`;
67
68 // add the generator to this context
69 generators[name] = Object.assign(config, {
70 name: name,
71 basePath: plopfilePath,
72 });
73
74 return generators[name];
75 }
76
77 const getHelperList = () =>
78 Object.keys(helpers).filter((h) => !baseHelpers.includes(h));

Callers

nothing calls this directly

Calls 2

setGeneratorMethod · 0.80
getGeneratorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…