Skip to content

Commit 9632d80

Browse files
committed
feat(cli): add support for .mjs and .cjs scripts in compas run
1 parent e65689b commit 9632d80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cli/src/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export function collectScripts() {
2525
const userDir = pathJoin(process.cwd(), "scripts");
2626
if (existsSync(userDir)) {
2727
for (const item of readdirSync(userDir)) {
28-
if (!item.endsWith(".js")) {
28+
if (
29+
!item.endsWith(".js") &&
30+
!item.endsWith(".mjs") &&
31+
!item.endsWith(".cjs")
32+
) {
2933
continue;
3034
}
3135

0 commit comments

Comments
 (0)