From e6dd37b2e2a1a82f09b43422d1f7249e65705a95 Mon Sep 17 00:00:00 2001 From: Jeevitha P Date: Thu, 2 May 2024 16:01:16 +0530 Subject: [PATCH] minor changes --- .npmrc | 1 + CHANGELOG.md | 2 +- README.md | 2 +- index.js | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9cf9495 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 57a9d99..ca201d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). -## Version 1.0.0 - 27.03.2024 +## Version 1.0.0 - 02.05.2024 ### Added diff --git a/README.md b/README.md index 6d27aee..b9601b6 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ $ npm install @cap-js/asyncapi ### Usage ```sh -require("@cap-js/asyncapi").registerAsyncapiCompileTarget() +require("@cap-js/asyncapi").register() ``` ## Generate AsyncAPI document diff --git a/index.js b/index.js index 5728bde..27fcc34 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ function _lazyRegisterCompileTarget() { return value } -const registerAsyncapiCompileTarget = () => { +const register = () => { Object.defineProperty(cds.compile.to, "asyncapi", { get: _lazyRegisterCompileTarget, configurable: true @@ -14,4 +14,4 @@ const registerAsyncapiCompileTarget = () => { } -module.exports = { registerAsyncapiCompileTarget } +module.exports = { register }