JSPM

nx-loopback-next-cli

2.11.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q58845F
  • License MIT

Yeoman generator for LoopBack 4 on nx

Package Exports

  • nx-loopback-next-cli

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nx-loopback-next-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nx-loopback-next-cli (@loopback/cli fork)

Nx friendly @loopback/cli (official CLI for LoopBack 4)

Installation

Run the following command to install the CLI.

yarn add nx-loopback-next-cli

Basic Use

Run nx-lb4 --commands or nx-lb4 -l to list all available commands:

See CLI reference for a detailed documentation.

Usage w/ loopback 4

  1. Generate a loopback app w/ nx-loopback-next ;

  2. Update your workspace.json file :

    {
      "projects": {
        "{{YOUR_PROJECT}}": {
          // ...
          "architect": {
            // ...
            "model": {
              "builder": "@nrwl/workspace:run-commands",
              "options": {
                "command": "nx-lb4 model --appDir={{YOUR_PROJECT}}"
              }
            }
          }
        }
      }
    }
  3. Use the new command :

    nx model gateway

Changes from official repo

  • artifact-generator gets a new option appDir (default: process.cwd()) ;
  • Every generators making use of utils.sourceRootDir are updated to prepend appDir ;

"Fixed" commands

  • model
  • datasource
  • controller
  • interceptor
  • observer
  • openapi
  • relation
  • repository
  • rest-crud
  • service

License

MIT