- SevnStackCLI
The SevnStackCLI class manages the command-line interface for the SevnStack application. It sets up commands, handles user input, and invokes the appropriate actions.
- Scaffolder
Class representing the scaffolder for SevnStack projects. This class handles the process of setting up the project structure, processing templates, and installing dependencies.
The SevnStackCLI class manages the command-line interface for the SevnStack application. It sets up commands, handles user input, and invokes the appropriate actions.
Kind: global class
- SevnStackCLI
- new SevnStackCLI()
- instance
- .setupCommands()
- .findQuestion(name) ⇒
object
- .commandCreate(appName, options) ⇒
Promise.<void>
- .commandInit()
- .commandAddFeature()
- .commandUpdate()
- .commandBuild()
- .commandStart()
- .commandDeploy()
- .scaffold(config) ⇒
Promise.<void>
- .getDefaults(appName, options) ⇒
Promise.<object>
- .execute() ⇒
void
- static
- .execute() ⇒
void
- .execute() ⇒
Constructs the CLI application and sets up the commands.
Sets up CLI commands and their corresponding actions.
Kind: instance method of SevnStackCLI
Finds a question by its name from the predefined list of questions.
Kind: instance method of SevnStackCLI
Returns: object
- The found question object.
Param | Type | Description |
---|---|---|
name | string |
The name of the question to find. |
Handles the 'create' command to scaffold a new full-stack web application.
Kind: instance method of SevnStackCLI
Param | Type | Description |
---|---|---|
appName | string |
The name of the application to create. |
options | object |
Command-line options provided by the user. |
Initializes a new project in an existing directory.
Kind: instance method of SevnStackCLI
Adds new features to an existing project.
Kind: instance method of SevnStackCLI
Updates the project dependencies or migrates to a newer version.
Kind: instance method of SevnStackCLI
Builds the project for production deployment.
Kind: instance method of SevnStackCLI
Starts the development server for the project.
Kind: instance method of SevnStackCLI
Assists with the deployment of the project to different environments.
Kind: instance method of SevnStackCLI
Scaffolds the project based on the provided configuration.
Kind: instance method of SevnStackCLI
Param | Type | Description |
---|---|---|
config | object |
The configuration for scaffolding the project. |
Gets the default configuration for the project based on provided options.
Kind: instance method of SevnStackCLI
Returns: Promise.<object>
- The default configuration object.
Param | Type | Description |
---|---|---|
appName | string |
The name of the application. |
options | object |
Command-line options provided by the user. |
Parses the command-line arguments and executes the corresponding command. This method triggers the action bound to the command entered by the user.
Kind: instance method of SevnStackCLI
Static method to create an instance of SevnStackCLI and execute it. This is the entry point for running the CLI from an external caller.
Kind: static method of SevnStackCLI
Class representing the scaffolder for SevnStack projects. This class handles the process of setting up the project structure, processing templates, and installing dependencies.
Kind: global class
- Scaffolder
- new Scaffolder(config)
- .prepareConfig()
- .getFilesRecursively(dir, [baseDir]) ⇒
Promise.<Array.<string>>
- .execute()
- .createDirectories()
- .processFiles()
- .prepareFilesToProcess() ⇒
Promise.<Array.<Object>>
- .addFilesToProcess(filePaths, filesToProcess, basePath, prefix)
- .installDependencies()
- .runNpmInstall(directory) ⇒
Promise.<void>
- .cleanupResources()
Create a Scaffolder.
Param | Type | Description |
---|---|---|
config | Object |
The configuration object for scaffolding. |
Prepares the configuration object by modifying and adding necessary properties.
Kind: instance method of Scaffolder
Recursively retrieves files from a directory.
Kind: instance method of Scaffolder
Returns: Promise.<Array.<string>>
- - A promise that resolves to an array of file paths.
Param | Type | Default | Description |
---|---|---|---|
dir | string |
The directory to search in. | |
[baseDir] | string |
"''" |
The base directory path for recursion. |
Executes the entire scaffolding process.
Kind: instance method of Scaffolder
Creates necessary directories for the project based on its configuration.
Kind: instance method of Scaffolder
Processes and prepares files for scaffolding - includes handling templates and static files.
Kind: instance method of Scaffolder
Prepares the list of files to be processed for scaffolding.
Kind: instance method of Scaffolder
Returns: Promise.<Array.<Object>>
- - A promise that resolves to an array of file objects to process.
Adds files to the processing list, adjusting paths and determining if they are templates.
Kind: instance method of Scaffolder
Param | Type | Description |
---|---|---|
filePaths | Array.<string> |
Array of file paths to process. |
filesToProcess | Array.<Object> |
Array of file objects that are being processed. |
basePath | string |
Base path for the files. |
prefix | string |
Prefix to prepend to file paths. |
Installs dependencies in the appropriate directories (client/server or src).
Kind: instance method of Scaffolder
Runs npm install in the specified directory.
Kind: instance method of Scaffolder
Returns: Promise.<void>
- - A promise that resolves when the installation is complete.
Param | Type | Description |
---|---|---|
directory | string |
The directory to run npm install in. |
Cleans up resources by removing the scaffolding target directory in case of errors.
Kind: instance method of Scaffolder