UNPKG

561 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const cli_ux_1 = require("cli-ux");
4const fs = require("fs");
5const logSymbols = require('log-symbols');
6exports.askForScriptPath = async () => {
7 console.log();
8 const scriptPath = await cli_ux_1.cli.prompt('Enter the relative path to your raw script file');
9 if (!fs.existsSync(scriptPath)) {
10 console.log();
11 console.log(logSymbols.error, `The file: ${scriptPath} does not exist.`);
12 return exports.askForScriptPath();
13 }
14 return scriptPath;
15};