Skip to content

Commit a8e8df3

Browse files
committed
chore(dev-utils): Added simple sass-migrator command
1 parent d8c3f12 commit a8e8df3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

packages/dev-utils/src/cli.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { libsize } from "./libsize";
1111
import { release, RELEASE_TYPES, toReleaseType } from "./release";
1212
import { sandbox } from "./sandbox";
1313
import { sassdoc } from "./sassdoc";
14+
import { sassMigrator } from "./sassMigrator";
1415
import { shared } from "./shared";
1516
import { themes } from "./themes";
1617
import { typedoc } from "./typedoc";
@@ -205,4 +206,6 @@ createCommand("typedoc")
205206
)
206207
.action(() => typedoc());
207208

209+
createCommand("migrate").action(() => sassMigrator());
210+
208211
program.parse(process.argv);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { exec } from "child_process";
2+
import { promisify } from "util";
3+
4+
import { glob } from "./utils";
5+
6+
const execPromise = promisify(exec);
7+
8+
export async function sassMigrator(): Promise<void> {
9+
const files = await glob("packages/!(documentation)/src/**/*.scss");
10+
11+
await Promise.all(
12+
files.map((file) => execPromise(`sass-migrator division ${file}`))
13+
);
14+
}

0 commit comments

Comments
 (0)