@needle-di/core 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> A lightweight, type-safe Dependency Injection (DI) library for JavaScript and TypeScript projects.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@needle-di/core)
|
|
6
|
+
[](https://www.npmjs.com/package/needle-di/core)
|
|
7
|
+
[](https://github.com/needle-di/core/actions/workflows/main.yml)
|
|
8
8
|
|
|
9
9
|
Needle DI is a lightweight, TypeScript-first library for dependency injection (DI). It is designed to be both easy to use and highly efficient.
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ Needle DI is a lightweight, TypeScript-first library for dependency injection (D
|
|
|
23
23
|
Here’s a simple example using constructor injection to inject one service into another.
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
import { injectable, inject } from "needle-di";
|
|
26
|
+
import { injectable, inject } from "@needle-di/core";
|
|
27
27
|
|
|
28
28
|
@injectable()
|
|
29
29
|
class FooService {}
|
|
@@ -39,7 +39,7 @@ The `@injectable` decorator eliminates the need to manually register services. T
|
|
|
39
39
|
dependency injection container, and use the `container.get()` method:
|
|
40
40
|
|
|
41
41
|
```typescript
|
|
42
|
-
import { Container } from "needle-di";
|
|
42
|
+
import { Container } from "@needle-di/core";
|
|
43
43
|
|
|
44
44
|
const container = new Container();
|
|
45
45
|
const barService = container.get(BarService);
|
|
@@ -51,7 +51,7 @@ Check out the [docs](https://needle-di.io/concepts/binding.html) to learn more!
|
|
|
51
51
|
## Installation
|
|
52
52
|
|
|
53
53
|
```
|
|
54
|
-
npm install --save needle-di
|
|
54
|
+
npm install --save needle-di/core
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Docs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-di/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "A simple TypeScript library for dependency injection",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/
|
|
25
|
+
"url": "git+https://github.com/needle-di/core.git"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"module": "dist/index.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@eslint/js": "^9.10.0",
|
|
50
|
+
"@release-it/bumper": "^6.0.1",
|
|
50
51
|
"@total-typescript/tsconfig": "github:total-typescript/tsconfig",
|
|
51
52
|
"@vitest/coverage-v8": "^2.1.1",
|
|
52
53
|
"eslint": "^9.10.0",
|