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

Function format

packages/cli/lib/init.js:136–142  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

134 type: (_, all) => all.features.includes('service-worker') && 'select',
135 choices: toChoices(['None', 'Offline Plugin', 'SW Precache', 'SW Workbox']),
136 format(val) {
137 if (val === 'none') return false;
138 // if (val === 'custom') return (all.swCustom=true,false); TODO
139 if (val === 'offline-plugin') return '@pwa/plugin-offline';
140 if (val === 'sw-precache') return '@pwa/plugin-sw-precache';
141 if (val === 'sw-workbox') return '@pwa/plugin-sw-workbox';
142 }
143 },
144 // TODO: Testing options
145 {

Callers 2

toAppFileFunction · 0.85
watch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…