Skip to content

Commit

Permalink
docs(dedupe): update desc abd enhance examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jan 3, 2024
1 parent de8a3f9 commit dc02ac9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/dedupe/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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__);
```
3 changes: 2 additions & 1 deletion packages/dedupe/package.json
Original file line number Diff line number Diff line change
@@ -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 <ali.mihandoost@gmail.com>",
"keywords": [
"dedupe",
"define-package",
"deduplicate",
"package",
"package-manager",
"cross-platform",
"ECMAScript",
"typescript",
Expand Down
2 changes: 1 addition & 1 deletion packages/dedupe/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const definedPackageList: Dictionary<string> = {};
*
* @example
* ```typescript
* definePackage('@scope/package-name', '2.0.1');
* definePackage('@scope/package-name', __package_version__);
* ```
*/
export function definePackage (packageName: string, version = 'v?'): void {
Expand Down

0 comments on commit dc02ac9

Please sign in to comment.