UNPKG

@foolishchow/vue-cli-plugin-ts-router-gen

Version:
34 lines (33 loc) 991 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var globby = require("globby"); var glob_watcher_1 = __importDefault(require("glob-watcher")); exports.Glob = function (globs) { var gs = (typeof globs == "string") ? [globs] : globs; return globby(gs, { cwd: process.cwd() }); }; exports.Watch = function (globs) { var gs = (typeof globs == "string") ? [globs] : globs; return glob_watcher_1.default(gs, { cwd: process.cwd(), ignoreInitial: false, useFsEvents: false }); // return new Promise((r, rj) => { // let watcher = GlobWatcher(gs, { // cwd: process.cwd(), // ignoreInitial: false // }, (error) => { // if (error) { // rj(error) // } else { // r(watcher); // } // }) // }) };