tool-snippets 0.0.7 → 0.0.8
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 +59 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Для WebStorm и VS Code:
|
|
2
2
|
|
|
3
3
|
```markdown
|
|
4
4
|
# ToolSnippets
|
|
@@ -40,6 +40,64 @@ npm run SNIPPETS:vscode
|
|
|
40
40
|
|
|
41
41
|
В редакторе начните вводить префикс сниппета (например `tool_deb`, `tool#forEach`, `tool___subscribe`) — IntelliSense предложит подстановку.
|
|
42
42
|
|
|
43
|
+
## Структура пакета
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
tool-snippets/
|
|
47
|
+
├── webstorm/
|
|
48
|
+
│ ├── _tool-frontend.xml
|
|
49
|
+
│ └── install-snippets.js
|
|
50
|
+
├── vscode/
|
|
51
|
+
│ ├── tool-frontend.code-snippets
|
|
52
|
+
│ └── install-snippets.js
|
|
53
|
+
├── package.json
|
|
54
|
+
└── README.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Разработка
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# сборка
|
|
61
|
+
ng build tool-snippets
|
|
62
|
+
|
|
63
|
+
# публикация
|
|
64
|
+
cd dist/tool-snippets
|
|
65
|
+
npm publish
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Требования
|
|
69
|
+
|
|
70
|
+
- Node.js (для скриптов установки)
|
|
71
|
+
|
|
72
|
+
### Группы:
|
|
73
|
+
|
|
74
|
+
**1. Массивы / циклы**
|
|
75
|
+
- `tool#forEach`, `tool#switch`, `tool#switch_NEVER`
|
|
76
|
+
|
|
77
|
+
**2. Angular хуки**
|
|
78
|
+
- `tool_comp_1_ngOnChanges`, `tool_comp_2_ngOnInit`, `tool_comp_3_ngAfterViewInit`, `tool_comp_4_ngOnDestroy`
|
|
79
|
+
|
|
80
|
+
**3. Angular подписки / DI / ViewChild**
|
|
81
|
+
- `tool___subscribe`, `tool___Injector`, `tool____ViewChild_Child`, `tool____ViewChild_Element`
|
|
82
|
+
|
|
83
|
+
**4. Angular getter/setter**
|
|
84
|
+
- `tool____get_set`, `tool____get_set@Input()`
|
|
85
|
+
|
|
86
|
+
**5. TypeScript типы**
|
|
87
|
+
- `tool--typePickPartialOmit`, `tool--type_keyof`, `tool--typeTNullable`, `tool--typePartial`, `tool#type_never`, `tool--Interface with readonly`
|
|
88
|
+
|
|
89
|
+
**6. TypeScript const / Record**
|
|
90
|
+
- `tool-as_const_1`, `tool-as_const_2_Record`, `tool-as_const_3_satisfies_Record`
|
|
91
|
+
|
|
92
|
+
**7. try/catch**
|
|
93
|
+
- `tool__tryCatch`, `tool__tryCatch.await`
|
|
94
|
+
|
|
95
|
+
**8. Отладка**
|
|
96
|
+
- `tool_deb`, `tool---globalErrorListeners`, `tool---Proxy_Логирование`
|
|
97
|
+
|
|
98
|
+
**9. Глобальные объекты**
|
|
99
|
+
- `tool----windowГлобальный_объект`
|
|
100
|
+
|
|
43
101
|
### Примеры сниппетов
|
|
44
102
|
|
|
45
103
|
| Префикс | Описание |
|
|
@@ -72,32 +130,3 @@ npm run SNIPPETS:vscode
|
|
|
72
130
|
| `tool#switch_NEVER` | `switch` + `never` |
|
|
73
131
|
| `tool----windowГлобальный_объект` | declare global window |
|
|
74
132
|
| `tool---globalErrorListeners` | global error listeners |
|
|
75
|
-
|
|
76
|
-
## Структура пакета
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
tool-snippets/
|
|
80
|
-
├── webstorm/
|
|
81
|
-
│ ├── _tool-frontend.xml
|
|
82
|
-
│ └── install-snippets.js
|
|
83
|
-
├── vscode/
|
|
84
|
-
│ ├── tool-frontend.code-snippets
|
|
85
|
-
│ └── install-snippets.js
|
|
86
|
-
├── package.json
|
|
87
|
-
└── README.md
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Разработка
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# сборка
|
|
94
|
-
ng build tool-snippets
|
|
95
|
-
|
|
96
|
-
# публикация
|
|
97
|
-
cd dist/tool-snippets
|
|
98
|
-
npm publish
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Требования
|
|
102
|
-
|
|
103
|
-
- Node.js (для скриптов установки)
|