1.0.0-preview.1 • Published 1 month ago
@magnolia/cli-start-plugin v1.0.0-preview.1
CLI Start Plugin
The Start plugin integrates with the Magnolia Command Line Interface (CLI). Its primary function is to easily initiate magnolia for development ease.
Installation
Install the Start via npm:
npm i @magnolia/cli-start-plugin
Add StartPlugin to mgnl.config.js file:
import StartPlugin from "@magnolia/cli-start-plugin";
export default {
commands: [
new StartPlugin()
]
};
Usage
npm run mgnl start -- [options]
Command-line options
-p, --path <path>
, The path to the apache-tomcat folder. If no path is provided, Magnolia CLI will look in the current working directory or parent directories for the nearest folder starting with "apache-tomcat"-lm, --light-modules <path>
, The path to lights module folder. If no lights module option is provided, the path from "magnolia.resources.dir" in "magnolia.properties" file will be used.
Example
1) Apache tomcat in current folder
Project Directory Structure:
```
/project-folder
|-- /apache-tomcat
| |-- /webapps
| | |-- /magnoliaAuthor
| | |-- ...
```
Run:
```bash
npm run mgnl start -- -p ./magnolia
```
2) Apache tomcat in child folder
Project directory example:
```
/project-folder
|-- /magnolia
| |-- /apache-tomcat
| | |-- /webapps
| | | |-- /magnoliaAuthor
| | | |-- ...
```
Run:
```bash
npm run mgnl start -- -p ./magnolia
```
Or alternatively:
```bash
cd ./magnolia
npm run mgnl start
```
3) Custom lights module folder
Project directory example:
```
/project-folder
|-- /magnolia
| |-- /apache-tomcat
| | |-- /webapps
| | | |-- /magnoliaAuthor
| | | |-- ...
|-- /light-modules
```
Run:
```bash
npm run mgnl start -- -p ./magnolia/apache-tomcat -lm ./light-modules
```
1.0.0-preview.2
1 month ago
1.0.0-preview.1
5 months ago