MCPcopy
hub / github.com/lukeed/pwa / toAppFile

Function toAppFile

packages/cli/lib/init.js:66–71  ·  view source on GitHub ↗

* Convert "App.{ext}" ~> "App/index.{ext}" * @param {String} str The original filename * @param {String} dest The (absolute) target directory * @return {String}

(str, dest)

Source from the content-addressed store, hash-verified

64 * @return {String}
65 */
66function toAppFile(str, dest) {
67 let { dir, name, ext } = parse(str);
68 dir = join(dest, dir, name);
69 name = 'index';
70 return format({ dir, name, ext });
71}
72
73/**
74 * Copy `templates/{dir}/**` ~> `${dest}/**`

Callers 1

copyDirFunction · 0.85

Calls 1

formatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…