MCPcopy Create free account
hub / github.com/Create-Node-App/create-node-app / getAddonTemplateDir

Function getAddonTemplateDir

src/paths.js:30–40  ·  view source on GitHub ↗
({ addon, git })

Source from the content-addressed store, hash-verified

28}
29
30async function getAddonTemplateDir({ addon, git }) {
31 if (git) {
32 const { dir, type } = await solveGitPath(addon);
33 if (type) {
34 return path.resolve(dir, type, 'template');
35 }
36 return path.resolve(dir, 'template');
37 }
38
39 return `${__dirname}/../addons/${addon}/template`;
40}
41
42module.exports = {
43 getAddonPackagePath,

Callers 1

loadFilesFunction · 0.85

Calls 1

solveGitPathFunction · 0.85

Tested by

no test coverage detected