Files
nebula.js/commands/create/command.js
Tobias Åström c5be00c77d feat: migrate all commands to esm (#1932)
* feat: migrate all commands to esm

* chore: fix server build

* chore: fix serve

* chore: adjust serve

* chore: adjust serve

* chore: serve esm only

* chore: serve esm only
2026-03-13 08:47:13 +01:00

52 lines
1.1 KiB
JavaScript

/* eslint-disable import/extensions */
import create from './lib/create.js';
const mashup = {
command: 'mashup <name>',
desc: 'Create a mashup',
builder(yargs) {
yargs.positional('name', {
type: 'string',
description: 'name of the project',
});
},
handler(argv) {
create(argv);
},
};
export default {
command: 'create <name>',
desc: 'Create a visualization',
builder(yargs) {
yargs.command(mashup);
yargs.positional('name', {
type: 'string',
description: 'name of the project',
});
yargs.option('install', {
type: 'boolean',
default: true,
description: 'Run package installation step',
});
yargs.option('pkgm', {
type: 'string',
choices: ['npm', 'yarn', 'pnpm'],
description: 'Package manager',
});
yargs.option('picasso', {
type: 'string',
choices: ['none', 'minimal', 'barchart'],
description: 'Picasso template',
});
yargs.option('author', {
type: 'string',
description: 'Package author',
});
},
handler(argv) {
create(argv);
},
};