fix: monorepo
This commit is contained in:
parent
0bd8b191fd
commit
65e3afbcd0
|
@ -13,12 +13,15 @@ const {
|
||||||
const cwd = normalize(FLECKS_CORE_ROOT);
|
const cwd = normalize(FLECKS_CORE_ROOT);
|
||||||
|
|
||||||
const create = async (flecks) => {
|
const create = async (flecks) => {
|
||||||
const name = process.argv[2];
|
let name = process.argv[2];
|
||||||
const {errors} = validate(name);
|
const {errors} = validate(name);
|
||||||
if (errors) {
|
if (errors) {
|
||||||
throw new Error(`@flecks/create-app: invalid app name: ${errors.join(', ')}`);
|
throw new Error(`@flecks/create-app: invalid app name: ${errors.join(', ')}`);
|
||||||
}
|
}
|
||||||
const destination = join(cwd, name);
|
const destination = join(cwd, name);
|
||||||
|
if (!name.startsWith('@')) {
|
||||||
|
name = `@${name}/monorepo`;
|
||||||
|
}
|
||||||
await move(name, join(__dirname, 'template'), destination, 'app', flecks);
|
await move(name, join(__dirname, 'template'), destination, 'app', flecks);
|
||||||
await build(destination);
|
await build(destination);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user