Skip to content

Commit

Permalink
chore: add case for .mjs files + zx typings
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 16, 2024
1 parent 7d30cc5 commit 828910d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions packages/config/eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,13 @@ module.exports = {
],
},
},
{
files: ["**/*.mjs"],
env: {
es6: true,
node: true,
console: true,
},
},
],
};
9 changes: 5 additions & 4 deletions packages/core/scripts/add-feature.mjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/usr/bin/env zx
import "zx/globals";
import { basename } from "node:path";
const features = argv._;

if (!features.length) {
await console.error(`Usage: ${basename(__filename)} <feature1> [<feature2> ...]`);
console.error(`Usage: ${basename(__filename)} <feature1> [<feature2> ...]`);
process.exit(1);
}

within(async () => {
cd('src');
cd("src");
for (const feature of features) {
const rootFolderName = `${feature}-feature`;
await $`mkdir ${rootFolderName}`;
within(async () => {
cd(rootFolderName);
await $`mkdir entities data use-cases repository`;
await $`touch entities/.gitkeep data/.gitkeep use-cases/.gitkeep repository/.gitkeep`;
})
});
}
})
});

0 comments on commit 828910d

Please sign in to comment.