UNPKG

@cuba-platform/front-generator

Version:
25 lines 743 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.exportList = void 0; const fs = require("fs"); const path = require("path"); function exportList(clients, { save }) { const data = JSON.stringify(clients); if (save) { const filepath = save; ensureDir(filepath); fs.writeFileSync(filepath, data); } console.log(data); } exports.exportList = exportList; /* istanbul ignore next */ //todo update node to v 10.x and user fs.mkdirSync({recursive: true}) function ensureDir(filePath) { var dirname = path.dirname(filePath); if (fs.existsSync(dirname)) { return true; } ensureDir(dirname); fs.mkdirSync(dirname); } //# sourceMappingURL=list.js.map