Skip to content

Commit

Permalink
Update cli.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Jan 22, 2024
1 parent 094d871 commit 17d581f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { parseArgs } from 'https://deno.land/std@0.212.0/cli/mod.ts';
import { WalkEntry, walkSync } from 'https://deno.land/std@0.212.0/fs/mod.ts';
import { green } from 'https://deno.land/std@0.212.0/fmt/colors.ts';
import { parseString as parseRegExpString } from 'https://raw.githubusercontent.com/TypeScriptPlayground/std/main/src/regexp/mod.ts'

const args = parseArgs<{
Expand Down Expand Up @@ -35,7 +36,7 @@ entries.forEach((entry) => {
const newPath = oldPath.replace(pattern, args.replacer);
const oldName = entry.isFile ? entry.name : '';
const newName = oldName.replace(pattern, args.replacer);
console.log(oldPath + oldName, '->', newPath + newName);
console.log(green(oldPath + oldName), '->', green(newPath + newName));

Deno.mkdirSync(newPath, {recursive: true});

Expand Down

0 comments on commit 17d581f

Please sign in to comment.