destiny
Advanced tools
Comparing version 0.0.15 to 0.0.16
{ | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"name": "destiny", | ||
@@ -4,0 +4,0 @@ "main": "dist/src/index.js", |
#!/usr/bin/env node | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -56,3 +65,7 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const files = []; | ||
for (const p of paths) { | ||
while (paths.length) { | ||
const p = paths.pop(); | ||
if (!p) { | ||
continue; | ||
} | ||
if (glob_1.default.hasMagic(p)) { | ||
@@ -66,3 +79,3 @@ const globFiles = glob_1.default.sync(p); | ||
else if (!fs_extra_1.existsSync(p)) { | ||
throw new Error("Unable to resolve the path:" + p); | ||
throw new Error("Unable to resolve the path: " + p); | ||
} | ||
@@ -78,3 +91,3 @@ else if (fs_extra_1.lstatSync(p).isDirectory()) { | ||
}; | ||
const run = (args) => { | ||
exports.run = (args) => __awaiter(void 0, void 0, void 0, function* () { | ||
const { options, paths } = parseArgs(args); | ||
@@ -95,7 +108,7 @@ if (options.help) | ||
console.log(filesToStructure); | ||
formatFileStructure_1.formatFileStructure(filesToStructure, filesToFixImports); | ||
}; | ||
yield formatFileStructure_1.formatFileStructure(filesToStructure, filesToFixImports); | ||
}); | ||
if (env.NODE_ENV !== "test") { | ||
run(argv.slice(2, argv.length)); | ||
exports.run(argv.slice(2, argv.length)); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"name": "destiny", | ||
@@ -4,0 +4,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
50877
698