@swell/cli
Version:
Swell's command line interface/utility
29 lines (28 loc) • 952 B
JavaScript
import { Args } from '@oclif/core';
import InitApp from '../app/init.js';
export default class InitTheme extends InitApp {
// Override command example for error messages
commandExample = 'swell theme init';
static args = {
id: Args.string({
default: '',
description: 'Theme identifier (defaults to current directory name)',
}),
};
static description = 'Initialize theme swell.json in the current directory.';
static examples = [
'$ swell theme init',
'$ swell theme init my-theme',
'$ swell theme init -y',
'$ swell theme init my-theme -y',
'$ swell theme init my-theme --storefront-app proxima -y',
];
static helpMeta = {
usageDirect: '[id] --storefront-app <app> [...] -y',
};
// Inherit all flags from InitApp (which inherits from CreateApp)
static flags = {
...InitApp.flags,
};
appType = 'theme';
}