diff --git a/packages/dedupe/README.md b/packages/dedupe/README.md index 0af28969..5d3e19c3 100644 --- a/packages/dedupe/README.md +++ b/packages/dedupe/README.md @@ -1,6 +1,6 @@ # Dedupe -A global package manager for defining and managing package versions across different parts of applications to prevent version conflicts. +A package manager helper tool for debug list of defined (imported) packages in your ecosystem and prevent to duplicate import (install) multiple versions of the same package in your project (deduplicate packages). ## Example usage @@ -9,3 +9,9 @@ import {definePackage} from '@alwatr/dedupe'; definePackage('@alwatr/logger', '2.0.0'); ``` + +You can use __package_version__ to automatically obtain the version of the package if you are using @alwatr/nano-build to build your package. + +```ts +definePackage('@alwatr/logger', __package_version__); +``` diff --git a/packages/dedupe/package.json b/packages/dedupe/package.json index 047d955d..13084c51 100644 --- a/packages/dedupe/package.json +++ b/packages/dedupe/package.json @@ -1,13 +1,14 @@ { "name": "@alwatr/dedupe", "version": "2.4.1", - "description": "A global package manager for defining and managing package versions across different parts of applications to prevent version conflicts.", + "description": "A package manager helper tool for debug list of defined (imported) packages in your ecosystem and prevent to duplicate import (install) multiple versions of the same package in your project (deduplicate packages).", "author": "S. Ali Mihandoost ", "keywords": [ "dedupe", "define-package", "deduplicate", "package", + "package-manager", "cross-platform", "ECMAScript", "typescript", diff --git a/packages/dedupe/src/main.ts b/packages/dedupe/src/main.ts index 02a0d7ca..a53f3aed 100644 --- a/packages/dedupe/src/main.ts +++ b/packages/dedupe/src/main.ts @@ -21,7 +21,7 @@ export const definedPackageList: Dictionary = {}; * * @example * ```typescript - * definePackage('@scope/package-name', '2.0.1'); + * definePackage('@scope/package-name', __package_version__); * ``` */ export function definePackage (packageName: string, version = 'v?'): void {