Skip to content

Commit

Permalink
Set add -p as beta (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
chgeo authored Jul 25, 2024
1 parent e81d149 commit b1ca0da
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/apis/cds-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,26 @@ module.exports = class extends cds.add.Plugin {
```
:::

#### Call `cds add` for an NPM package <beta />

Similar to `npx -p`, you can use the `--package/-p` option to directly install a package from an *npm* registry before running the command.
This lets you invoke `cds add` for CDS plugins easily with a single command:

```sh
cds add my-facet -p @cap-js-community/example
```

::: details Install directly from your GitHub branch

For example, if your plugin's code is in `https://github.com/cap-js-community/example` on branch `cds-add` and registers the command `cds add my-facet`, then doing an integration test of your plugin with `@sap/cds-dk` in a single command:
```sh
cds add my-facet -p @cap-js-community/example@git+https://github.com/cap-js-community/example#cds-add
```
:::
## Plugin API
Find here a complete overview of public `cds add` APIs.
Expand Down

0 comments on commit b1ca0da

Please sign in to comment.