-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0671bc7
commit 7643907
Showing
8 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/**/node_modules | ||
/**/coverage | ||
/**/coverage | ||
/**/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { exit, exitCode } from "process"; | ||
import { convertImages } from "./convert"; | ||
import { getForFiles } from "./files/index"; | ||
import { twirlTimer } from "./utils"; | ||
|
||
export async function execute(src: string) { | ||
await twirlTimer(); | ||
const files = await getForFiles(src); | ||
console.log("Todas as imagens foram selecionadas.") | ||
console.log("Todas as imagens foram selecionadas."); | ||
await convertImages(files); | ||
console.log("Todas as imagens foram convertidas.") | ||
console.log("Todas as imagens foram convertidas."); | ||
exit(exitCode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"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()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.twirlTimer = twirlTimer; | ||
function twirlTimer() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var P = ["\\", "|", "/", "-"]; | ||
var x = 0; | ||
return setInterval(function () { | ||
process.stdout.write("\r" + P[x++]); | ||
x &= 3; | ||
}, 250); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export async function twirlTimer() { | ||
var P = ["\\", "|", "/", "-"]; | ||
var x = 0; | ||
return setInterval(function() { | ||
process.stdout.write("\r" + P[x++]); | ||
x &= 3; | ||
}, 250) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.