@m-backend/cli
TypeScript icon, indicating that this package has built-in type declarations

1.4.8 • Public • Published

This library was generated with Nx.

Cli for M backend projects

This project is a lightweight CLI mainly for generating & compiling M Backend Core projects

How to use

Installation

Install the cli via npm with the following instructions:

npm i -g @m-backend/cli

Note: We highly recommend installing the CLI globally in order to use it as it should be (especially for project generation).

Usage

In order to execute anything, prefix the command with the keywords m-cli

Each command has its alternatives, feel free to use one of the possible alternatives for each command.

Command Arguments Options Default Value Possible values Description
g, generate {PROJECT_NAME} - - demo Generates a project
r, run - - - - Custom webpack configuration
// - -c, --config debug production, dev or debug Config environment webpack
// - -e, --entry ./src/main.ts - Define the entry point
// - -o, --out dist - Defines the build output
v, version - - - - Give the version of the Cli
ws, win-svc {SERVICE_NAME} {PATH} - - demo, C:\Dev Convert a nodejs app to windows service (lib)
// - -i, --install install - Install windows service
// - -u, --uninstall uninstall - Uninstall windows service
// - --max-old-space-size - 1536 Define the max old space size

Examples

Generating a new project

m-cli g <YOUR_PROJECT_NAME> or m-cli generate <YOUR_PROJECT_NAME>

Compiling a project in debug mode

m-cli run or m-cli run --config={env}

Convert a project to Windows service

Install
m-cli ws <PROJECT_NAME> <PATH> -i or m-cli win-svc demo C:\folders\ --install
Uninstall
m-cli ws <PROJECT_NAME> <PATH> -u or m-cli win-svc demo C:\folders\ --uninstall

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.8
    2
    • latest

Version History

Package Sidebar

Install

npm i @m-backend/cli

Weekly Downloads

68

Version

1.4.8

License

none

Unpacked Size

86.9 kB

Total Files

97

Last publish

Collaborators

  • metromobilite