UNPKG

st-mkdir

Version:

CLI tool for platform independent recursive creating directories

22 lines 723 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var chalk = require('chalk'); var os_1 = require("os"); var st_mkdir_windows_1 = require("./st-mkdir-windows"); var st_mkdir_linux_1 = require("./st-mkdir-linux"); var DEFAULT_OPTIONS = { silent: false }; exports.DIR_WILDCARD = "%%_dir_%%"; exports.mkdir = function (dir, options) { if (options === void 0) { options = DEFAULT_OPTIONS; } if (!options.silent) { console.log(chalk.cyan("creating directory: ") + dir); } var isWindows = os_1.platform() === "win32"; if (isWindows) { st_mkdir_windows_1.mkdir(dir); } else { st_mkdir_linux_1.mkdir(dir); } }; //# sourceMappingURL=st-mkdir.js.map