Skip to content

Commit

Permalink
feat(cli): add support for .mjs and .cjs scripts in compas run
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Jun 16, 2023
1 parent e65689b commit 9632d80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/cli/src/utils.js
Expand Up @@ -25,7 +25,11 @@ export function collectScripts() {
const userDir = pathJoin(process.cwd(), "scripts");
if (existsSync(userDir)) {
for (const item of readdirSync(userDir)) {
if (!item.endsWith(".js")) {
if (
!item.endsWith(".js") &&
!item.endsWith(".mjs") &&
!item.endsWith(".cjs")
) {
continue;
}

Expand Down

0 comments on commit 9632d80

Please sign in to comment.