Members
(static, constant) appToPlugin :TCommand
Command definition object for converting a Bajo app to a plugin.
(static, constant) createApp :TCommand
Command definition object for creating a Bajo app project.
(static, constant) createPlugin :TCommand
Command definition object for creating a Bajo plugin project.
(static, constant) templates :TCommand
Command definition object for listing project templates.
Methods
(async, static) buildPackageJson(options) → {Promise.<object>}
Build the package.json file for a new project.
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- The generated package.json object
- Type:
- Promise.<object>
(async, static) cancelProject() → {Promise.<void>}
Cancel project creation and optionally remove the project directory.
- Type:
- Promise.<void>
(async, static) copyMain(options) → {Promise.<void>}
Copy the main plugin files to the target directory and update the main class.
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) copyRootFiles(options) → {Promise.<void>}
Copy the root files of the project to the target directory and modify the license.
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) copySkel(options) → {Promise.<void>}
Copy the project skeleton to the target directory.
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) customInstall(options) → {Promise.<object>}
Custom installation process for selecting templates and plugins.
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Selected options
- Type:
- Promise.<object>
(async, static) dirNameCheck(argv, cwd) → {Promise.<string>}
Check the validity of the directory name and npm package name.
| Name | Type | Description |
|---|---|---|
argv | object | Command line arguments |
cwd | string | Current working directory |
- Validated directory path
- Type:
- Promise.<string>
(async, static) endOfISession() → {Promise.<string>}
Prompt the user at the end of an interactive session.
- User's choice
- Type:
- Promise.<string>
(async, static) ensureDir(cwd) → {Promise.<void>}
Ensure the project directory exists and change the current working directory to it.
| Name | Type | Description |
|---|---|---|
cwd | string | Current working directory |
- Type:
- Promise.<void>
(async, static) installPackages() → {Promise.<void>}
Install project dependencies.
- Type:
- Promise.<void>
(async, static) modifyLicense(options) → {Promise.<void>}
Modify the LICENSE.md file with the author's name and the current year.
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) modifyPluginFactory(options) → {Promise.<void>}
Modify the plugin factory file with the provided arguments.
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) modifyReadme(options) → {Promise.<void>}
Modify the README.md file with the provided arguments.
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>
(async, static) tplCheck(options) → {Promise.<(string|undefined)>}
Check if the specified template exists.
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Template directory or undefined if not found
- Type:
- Promise.<(string|undefined)>
(async, static) writePackageJson(options) → {Promise.<void>}
Write the package.json file with the provided package information.
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Parameters Properties
|
- Type:
- Promise.<void>