1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | exports.askSWSrc = void 0;
|
11 | const inquirer_1 = require("inquirer");
|
12 | const common_tags_1 = require("common-tags");
|
13 |
|
14 | const name = 'swSrc';
|
15 |
|
16 |
|
17 |
|
18 | function askQuestion() {
|
19 | return (0, inquirer_1.prompt)([
|
20 | {
|
21 | name,
|
22 | message: (0, common_tags_1.oneLine) `Where's your existing service worker file? To be used with
|
23 | injectManifest, it should include a call to
|
24 | 'self.__WB_MANIFEST'`,
|
25 | type: 'input',
|
26 | },
|
27 | ]);
|
28 | }
|
29 | async function askSWSrc() {
|
30 | const answers = await askQuestion();
|
31 |
|
32 | return answers[name] ? answers[name].trim() : null;
|
33 | }
|
34 | exports.askSWSrc = askSWSrc;
|