static-injector 4.0.0 → 4.0.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/readme.md +33 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "static-injector",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Angular 依赖注入独立版本;Angular dependency injection standalone version",
5
5
  "keywords": [
6
6
  "angular",
@@ -10,7 +10,8 @@
10
10
  "typescript 5.4.2",
11
11
  "injectable",
12
12
  "static-inject",
13
- "dependency injection"
13
+ "dependency injection",
14
+ "injection-js"
14
15
  ],
15
16
  "repository": {
16
17
  "type": "git",
package/readme.md CHANGED
@@ -1,31 +1,41 @@
1
- # 简介
1
+ | [中文](https://github.com/wszgrcy/cyia-localize/blob/master/readme.zh-Hans.md) | [English](./readme.md) |
2
+ |-|-|
2
3
 
3
- - 这是 Angualr 依赖注入的独立版本,初始版本逻辑为从 Angular 源码中提取出来,并修复了一些已知 bug
4
- - 使用方法与 Angular 的依赖注入完全一致
5
- # 来源
6
- - Angular 17.0.4
7
- # 兼容
8
- - ts 5.2.2
9
- # 使用方法
4
+ # Introduction
10
5
 
11
- - 以`Injector.create`创建第一级依赖注入器
12
- - 声明为依赖注入类即为`@Injectable`装饰器
6
+ - Angular dependency injection standalone version
7
+ - The usage method is completely consistent with Angular's dependency injection
13
8
 
14
- # 与`injection-js`的不同
9
+ # Source
10
+ - Angular 17.3.1
15
11
 
16
- - `injection-js`属于动态依赖注入,是 Angular5 之前使用的版本,Angular5 之后转为静态依赖注入
17
- - 理论上会比`injection-js`快一些(否则 Angular 也不会做替换...),但是没有做 Benchmark
18
- - 需要会使用`typescript`调用转换器进行转换,或者使用 webpack 的 ts-loader 传入转换器,或者其他转换工具支持 typescript 并且支持 typescript 的自定义转换器
19
- > 未来会提供各个打包工具的使用方法
20
- - 两者基本上可以互换(细节部分需要调整)
12
+ # dependency
13
+ - ts 5.4.2
21
14
 
22
- # 测试
15
+ # Usage
23
16
 
24
- - 做了一部分的单元测试.保证大部分功能正常使用
25
- - 因为大部分代码本身就是从 Angular 中提取的,所以稳定性肯定也是有保证
17
+ - Create a first level dependency injector with `Injector.create`
18
+ - Declare as a dependency injection class using the `@Injectable` decorator
26
19
 
27
- # 模板
20
+ # Different from `injection-js`
28
21
 
29
- - [typescript 下使用(使用 Typescript Compiler API)](https://github.com/wszgrcy/static-injector-typescript-template)
30
- - [webpack 下使用](https://github.com/wszgrcy/static-injector-webpack-template)
31
- - [rollup 下使用](https://github.com/wszgrcy/static-injector-rollup-template)
22
+ - `injection-js` belongs to dynamic dependency injection and is a version used before Angular5. After Angular5, it has been converted to static dependency injection
23
+ - In theory, it would be faster than `injection-js` (otherwise Angular wouldn't do the replacement...), but there was no benchmark done
24
+ - Need to use `typescript` to call the transformer for conversion/use webpack's ts loader to pass in the converter/roll up/ts node/other conversion tools support typescript and custom converters that support typescript
25
+ - The two are basically interchangeable (the details need to be adjusted)
26
+
27
+ - Support the use of `inject` during construction
28
+
29
+ # Test
30
+
31
+ - Partially conducted unit testing to ensure that most functions are functioning properly
32
+ - Because most of the code itself is extracted from Angular, stability is definitely guaranteed
33
+
34
+ # Sync
35
+ - Currently, the synchronization logic has been refactored and modified using `@code recycle/cli` to ensure consistency with the official version of `angular`
36
+
37
+ # Template
38
+
39
+ - [Used under typescript (using Typescript Compiler API)](https://github.com/wszgrcy/static-injector-typescript-template)
40
+ - [Used under webpack](https://github.com/wszgrcy/static-injector-webpack-template)
41
+ - [Using Rollup](https://github.com/wszgrcy/static-injector-rollup-template)