Skip to content

Commit

Permalink
fix: monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
cha0s committed Jan 2, 2024
1 parent 0bd8b19 commit 65e3afb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/create-app/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ const {
const cwd = normalize(FLECKS_CORE_ROOT);

const create = async (flecks) => {
const name = process.argv[2];
let name = process.argv[2];
const {errors} = validate(name);
if (errors) {
throw new Error(`@flecks/create-app: invalid app name: ${errors.join(', ')}`);
}
const destination = join(cwd, name);
if (!name.startsWith('@')) {
name = `@${name}/monorepo`;
}
await move(name, join(__dirname, 'template'), destination, 'app', flecks);
await build(destination);
};
Expand Down

0 comments on commit 65e3afb

Please sign in to comment.