Skip to content

Commit 08c97d6

Browse files
committed
update readme, remove xmpl and update to index.js
1 parent feaaa4e commit 08c97d6

File tree

11 files changed

+5
-106
lines changed

11 files changed

+5
-106
lines changed

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,15 @@
22

33
# AsyncAPI Plugin
44

5-
The `@cap-js/asyncapi` package is a [CDS plugin](https://cap.cloud.sap/docs/node.js/cds-plugins#cds-plugin-packages) that provides support for AsyncAPI document compilation.
5+
The `@cap-js/asyncapi` is a package that provides support for AsyncAPI document compilation.
66

77
### Table of Contents
88

9-
- [Setup](#setup)
109
- [Generate AsyncAPI document](#generate-asyncapi-document)
1110
- [Contributing](#contributing)
1211
- [Code of Conduct](#code-of-conduct)
1312
- [Licensing](#licensing)
1413

15-
## Setup
16-
17-
To use `cds compile --to asyncapi` functionality, simply add this self-configuring plugin package to your project:
18-
19-
```sh
20-
npm add @cap-js/asyncapi
21-
```
22-
23-
In this guide, we use the [Incidents Management reference sample app](https://github.com/cap-js/incidents-app) as the base, to generate the AsyncAPI document for the `services.cds` file.
24-
2514
## Generate AsyncAPI document
2615

2716
### 1. Usage of programatic API

cds-plugin.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/compile/api.js renamed to index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const cds = require('@sap/cds')
22

33
function _lazyRegisterCompileTargets() {
4-
const value = require('./index')
4+
const value = require('./lib/compile/index')
55
Object.defineProperty(this, "asyncapi", { value })
66
return value
77
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@cap-js/asyncapi",
33
"version": "1.0.0",
4-
"description": "CAP Plugin for AsyncAPI",
4+
"description": "CAP tool for AsyncAPI",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/cap-js/asyncapi.git"
@@ -15,9 +15,8 @@
1515
],
1616
"author": "SAP SE (https://www.sap.com)",
1717
"license": "SEE LICENSE IN LICENSE",
18-
"main": "cds-plugin.js",
18+
"main": "index.js",
1919
"files": [
20-
"cds-plugin.js",
2120
"lib/"
2221
],
2322
"scripts": {

test/lib/compile/asyncapiOptions.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const toAsyncAPI = require('../../../lib/compile');
2-
require('../../../cds-plugin')
2+
require('../../../').registerCompileTargets();
33
const cds = require('@sap/cds');
44
const { readdir, read, path: { resolve } } = cds.utils;
55
const { join } = require('path');

xmpl/.cdsrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

xmpl/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

xmpl/README.md

Whitespace-only changes.

xmpl/package.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

xmpl/srv/server.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)