@rxap/plugin-angular 20.0.1-dev.11 → 20.0.1-dev.12

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 (274) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +15 -3
  3. package/src/application.d.ts +6 -0
  4. package/src/application.js +77 -0
  5. package/src/application.js.map +1 -0
  6. package/src/executors/check-ng-package/executor.d.ts +5 -0
  7. package/src/executors/check-ng-package/executor.js +30 -0
  8. package/src/executors/check-ng-package/executor.js.map +1 -0
  9. package/src/executors/config/executor.d.ts +10 -0
  10. package/src/executors/config/executor.js +65 -0
  11. package/src/executors/config/executor.js.map +1 -0
  12. package/src/executors/i18n/executor.d.ts +9 -0
  13. package/src/executors/i18n/executor.js +158 -0
  14. package/src/executors/i18n/executor.js.map +1 -0
  15. package/src/executors/tailwind/executor.d.ts +5 -0
  16. package/src/executors/tailwind/executor.js +31 -0
  17. package/src/executors/tailwind/executor.js.map +1 -0
  18. package/src/generators/convert-to-buildable-library/generator.d.ts +4 -0
  19. package/src/generators/convert-to-buildable-library/generator.js +88 -0
  20. package/src/generators/convert-to-buildable-library/generator.js.map +1 -0
  21. package/src/generators/fix-schematic/generator.d.ts +4 -0
  22. package/src/generators/fix-schematic/generator.js +72 -0
  23. package/src/generators/fix-schematic/generator.js.map +1 -0
  24. package/src/generators/fix-schematic/index.d.ts +2 -0
  25. package/src/generators/fix-schematic/index.js +7 -0
  26. package/src/generators/fix-schematic/index.js.map +1 -0
  27. package/src/generators/init/coerce-nx-json.d.ts +3 -0
  28. package/src/generators/init/coerce-nx-json.js +69 -0
  29. package/src/generators/init/coerce-nx-json.js.map +1 -0
  30. package/src/generators/init/generator.d.ts +4 -0
  31. package/src/generators/init/generator.js +19 -0
  32. package/src/generators/init/generator.js.map +1 -0
  33. package/src/generators/init/index.d.ts +2 -0
  34. package/src/generators/init/index.js +7 -0
  35. package/src/generators/init/index.js.map +1 -0
  36. package/src/generators/init/init-workspace.d.ts +3 -0
  37. package/src/generators/init/init-workspace.js +73 -0
  38. package/src/generators/init/init-workspace.js.map +1 -0
  39. package/src/generators/init-application/assert-main-statements.d.ts +4 -0
  40. package/src/generators/init-application/assert-main-statements.js +76 -0
  41. package/src/generators/init-application/assert-main-statements.js.map +1 -0
  42. package/src/generators/init-application/cleanup.d.ts +3 -0
  43. package/src/generators/init-application/cleanup.js +108 -0
  44. package/src/generators/init-application/cleanup.js.map +1 -0
  45. package/src/generators/init-application/coerce-app-config.d.ts +3 -0
  46. package/src/generators/init-application/coerce-app-config.js +143 -0
  47. package/src/generators/init-application/coerce-app-config.js.map +1 -0
  48. package/src/generators/init-application/coerce-environment-files.d.ts +5 -0
  49. package/src/generators/init-application/coerce-environment-files.js +75 -0
  50. package/src/generators/init-application/coerce-environment-files.js.map +1 -0
  51. package/src/generators/init-application/coerce-localazy-config-file.d.ts +2 -0
  52. package/src/generators/init-application/coerce-localazy-config-file.js +25 -0
  53. package/src/generators/init-application/coerce-localazy-config-file.js.map +1 -0
  54. package/src/generators/init-application/coerce-project.d.ts +4 -0
  55. package/src/generators/init-application/coerce-project.js +56 -0
  56. package/src/generators/init-application/coerce-project.js.map +1 -0
  57. package/src/generators/init-application/generate-authentication.d.ts +3 -0
  58. package/src/generators/init-application/generate-authentication.js +97 -0
  59. package/src/generators/init-application/generate-authentication.js.map +1 -0
  60. package/src/generators/init-application/generate-monolithic.d.ts +3 -0
  61. package/src/generators/init-application/generate-monolithic.js +45 -0
  62. package/src/generators/init-application/generate-monolithic.js.map +1 -0
  63. package/src/generators/init-application/generator.d.ts +4 -0
  64. package/src/generators/init-application/generator.js +257 -0
  65. package/src/generators/init-application/generator.js.map +1 -0
  66. package/src/generators/init-application/index.d.ts +2 -0
  67. package/src/generators/init-application/index.js +7 -0
  68. package/src/generators/init-application/index.js.map +1 -0
  69. package/src/generators/init-application/link-mfe-remote-with-host.d.ts +3 -0
  70. package/src/generators/init-application/link-mfe-remote-with-host.js +54 -0
  71. package/src/generators/init-application/link-mfe-remote-with-host.js.map +1 -0
  72. package/src/generators/init-application/project-i18n-configuration.d.ts +7 -0
  73. package/src/generators/init-application/project-i18n-configuration.js +3 -0
  74. package/src/generators/init-application/project-i18n-configuration.js.map +1 -0
  75. package/src/generators/init-application/update-git-ignore.d.ts +3 -0
  76. package/src/generators/init-application/update-git-ignore.js +16 -0
  77. package/src/generators/init-application/update-git-ignore.js.map +1 -0
  78. package/src/generators/init-application/update-main-file.d.ts +3 -0
  79. package/src/generators/init-application/update-main-file.js +106 -0
  80. package/src/generators/init-application/update-main-file.js.map +1 -0
  81. package/src/generators/init-application/update-project-targets.d.ts +6 -0
  82. package/src/generators/init-application/update-project-targets.js +210 -0
  83. package/src/generators/init-application/update-project-targets.js.map +1 -0
  84. package/src/generators/init-application/update-tags.d.ts +3 -0
  85. package/src/generators/init-application/update-tags.js +25 -0
  86. package/src/generators/init-application/update-tags.js.map +1 -0
  87. package/src/generators/init-application/update-target-defaults.d.ts +3 -0
  88. package/src/generators/init-application/update-target-defaults.js +30 -0
  89. package/src/generators/init-application/update-target-defaults.js.map +1 -0
  90. package/src/generators/init-application/update-ts-config.d.ts +2 -0
  91. package/src/generators/init-application/update-ts-config.js +30 -0
  92. package/src/generators/init-application/update-ts-config.js.map +1 -0
  93. package/src/generators/init-component/generator.d.ts +5 -0
  94. package/src/generators/init-component/generator.js +106 -0
  95. package/src/generators/init-component/generator.js.map +1 -0
  96. package/src/generators/init-component/index.d.ts +2 -0
  97. package/src/generators/init-component/index.js +7 -0
  98. package/src/generators/init-component/index.js.map +1 -0
  99. package/src/generators/init-feature/generator.d.ts +4 -0
  100. package/src/generators/init-feature/generator.js +53 -0
  101. package/src/generators/init-feature/generator.js.map +1 -0
  102. package/src/generators/init-feature/index.d.ts +2 -0
  103. package/src/generators/init-feature/index.js +7 -0
  104. package/src/generators/init-feature/index.js.map +1 -0
  105. package/src/generators/init-feature-library/generator.d.ts +4 -0
  106. package/src/generators/init-feature-library/generator.js +51 -0
  107. package/src/generators/init-feature-library/generator.js.map +1 -0
  108. package/src/generators/init-feature-library/index.d.ts +2 -0
  109. package/src/generators/init-feature-library/index.js +7 -0
  110. package/src/generators/init-feature-library/index.js.map +1 -0
  111. package/src/generators/init-feature-library/init-project.d.ts +3 -0
  112. package/src/generators/init-feature-library/init-project.js +41 -0
  113. package/src/generators/init-feature-library/init-project.js.map +1 -0
  114. package/src/generators/init-feature-library/init-workspace.d.ts +3 -0
  115. package/src/generators/init-feature-library/init-workspace.js +12 -0
  116. package/src/generators/init-feature-library/init-workspace.js.map +1 -0
  117. package/src/generators/init-library/check-if-secondary-entrypoint-include-in-the-ts-config.d.ts +2 -0
  118. package/src/generators/init-library/check-if-secondary-entrypoint-include-in-the-ts-config.js +39 -0
  119. package/src/generators/init-library/check-if-secondary-entrypoint-include-in-the-ts-config.js.map +1 -0
  120. package/src/generators/init-library/cleanup.d.ts +2 -0
  121. package/src/generators/init-library/cleanup.js +16 -0
  122. package/src/generators/init-library/cleanup.js.map +1 -0
  123. package/src/generators/init-library/coerce-projects.d.ts +3 -0
  124. package/src/generators/init-library/coerce-projects.js +92 -0
  125. package/src/generators/init-library/coerce-projects.js.map +1 -0
  126. package/src/generators/init-library/coerce-tailwind-theme-scss.d.ts +2 -0
  127. package/src/generators/init-library/coerce-tailwind-theme-scss.js +22 -0
  128. package/src/generators/init-library/coerce-tailwind-theme-scss.js.map +1 -0
  129. package/src/generators/init-library/extend-angular-specific-eslint.d.ts +2 -0
  130. package/src/generators/init-library/extend-angular-specific-eslint.js +25 -0
  131. package/src/generators/init-library/extend-angular-specific-eslint.js.map +1 -0
  132. package/src/generators/init-library/generator.d.ts +4 -0
  133. package/src/generators/init-library/generator.js +56 -0
  134. package/src/generators/init-library/generator.js.map +1 -0
  135. package/src/generators/init-library/has-index-scss.d.ts +2 -0
  136. package/src/generators/init-library/has-index-scss.js +11 -0
  137. package/src/generators/init-library/has-index-scss.js.map +1 -0
  138. package/src/generators/init-library/has-tailwind-config.d.ts +2 -0
  139. package/src/generators/init-library/has-tailwind-config.js +8 -0
  140. package/src/generators/init-library/has-tailwind-config.js.map +1 -0
  141. package/src/generators/init-library/index.d.ts +2 -0
  142. package/src/generators/init-library/index.js +7 -0
  143. package/src/generators/init-library/index.js.map +1 -0
  144. package/src/generators/init-library/init-project.d.ts +3 -0
  145. package/src/generators/init-library/init-project.js +37 -0
  146. package/src/generators/init-library/init-project.js.map +1 -0
  147. package/src/generators/init-library/init-workspace.d.ts +3 -0
  148. package/src/generators/init-library/init-workspace.js +21 -0
  149. package/src/generators/init-library/init-workspace.js.map +1 -0
  150. package/src/generators/init-library/is-ng-packagr-project.d.ts +2 -0
  151. package/src/generators/init-library/is-ng-packagr-project.js +8 -0
  152. package/src/generators/init-library/is-ng-packagr-project.js.map +1 -0
  153. package/src/generators/init-library/ng-package-json.d.ts +8 -0
  154. package/src/generators/init-library/ng-package-json.js +16 -0
  155. package/src/generators/init-library/ng-package-json.js.map +1 -0
  156. package/src/generators/init-library/set-general-target-defaults.d.ts +2 -0
  157. package/src/generators/init-library/set-general-target-defaults.js +27 -0
  158. package/src/generators/init-library/set-general-target-defaults.js.map +1 -0
  159. package/src/generators/init-library/update-package-json.d.ts +2 -0
  160. package/src/generators/init-library/update-package-json.js +17 -0
  161. package/src/generators/init-library/update-package-json.js.map +1 -0
  162. package/src/generators/init-library/update-project-ng-package-configuration.d.ts +2 -0
  163. package/src/generators/init-library/update-project-ng-package-configuration.js +37 -0
  164. package/src/generators/init-library/update-project-ng-package-configuration.js.map +1 -0
  165. package/src/generators/init-library/update-ts-config.d.ts +2 -0
  166. package/src/generators/init-library/update-ts-config.js +22 -0
  167. package/src/generators/init-library/update-ts-config.js.map +1 -0
  168. package/src/generators/schematic/generator.d.ts +6 -0
  169. package/src/generators/schematic/generator.js +127 -0
  170. package/src/generators/schematic/generator.js.map +1 -0
  171. package/src/generators/schematic/index.d.ts +2 -0
  172. package/src/generators/schematic/index.js +7 -0
  173. package/src/generators/schematic/index.js.map +1 -0
  174. package/src/i18n.d.ts +6 -0
  175. package/src/i18n.js +83 -0
  176. package/src/i18n.js.map +1 -0
  177. package/src/index.js +10 -0
  178. package/src/index.js.map +1 -0
  179. package/src/lib/angular-version.d.ts +1 -0
  180. package/src/lib/angular-version.js +5 -0
  181. package/src/lib/angular-version.js.map +1 -0
  182. package/src/lib/coerce-cypress-component-testing.d.ts +2 -0
  183. package/src/lib/coerce-cypress-component-testing.js +78 -0
  184. package/src/lib/coerce-cypress-component-testing.js.map +1 -0
  185. package/src/lib/coerce-test-setup.d.ts +2 -0
  186. package/src/lib/coerce-test-setup.js +47 -0
  187. package/src/lib/coerce-test-setup.js.map +1 -0
  188. package/src/library.d.ts +6 -0
  189. package/src/library.js +100 -0
  190. package/src/library.js.map +1 -0
  191. package/src/migrations/update-19-0-0/add-m2-prefix-to-material-scss-functions.d.ts +2 -0
  192. package/src/migrations/update-19-0-0/add-m2-prefix-to-material-scss-functions.js +29 -0
  193. package/src/migrations/update-19-0-0/add-m2-prefix-to-material-scss-functions.js.map +1 -0
  194. package/src/migrations/update-19-0-0/migration.d.ts +9 -0
  195. package/src/migrations/update-19-0-0/migration.js +220 -0
  196. package/src/migrations/update-19-0-0/migration.js.map +1 -0
  197. package/.eslintignore +0 -6
  198. package/.eslintrc.json +0 -44
  199. package/LICENSE +0 -621
  200. package/README.md.handlebars +0 -115
  201. package/jest.config.ts +0 -11
  202. package/project.json +0 -68
  203. package/schematics.yaml +0 -6
  204. package/src/application.ts +0 -124
  205. package/src/executors/check-ng-package/executor.ts +0 -33
  206. package/src/executors/config/executor.ts +0 -74
  207. package/src/executors/i18n/executor.ts +0 -198
  208. package/src/executors/tailwind/executor.ts +0 -34
  209. package/src/generators/convert-to-buildable-library/generator.ts +0 -110
  210. package/src/generators/fix-schematic/generator.ts +0 -103
  211. package/src/generators/fix-schematic/index.ts +0 -5
  212. package/src/generators/init/coerce-nx-json.ts +0 -72
  213. package/src/generators/init/generator.ts +0 -28
  214. package/src/generators/init/index.ts +0 -5
  215. package/src/generators/init/init-workspace.ts +0 -84
  216. package/src/generators/init-application/assert-main-statements.ts +0 -74
  217. package/src/generators/init-application/cleanup.ts +0 -127
  218. package/src/generators/init-application/coerce-app-config.ts +0 -147
  219. package/src/generators/init-application/coerce-environment-files.ts +0 -105
  220. package/src/generators/init-application/coerce-localazy-config-file.ts +0 -26
  221. package/src/generators/init-application/coerce-project.ts +0 -128
  222. package/src/generators/init-application/generate-authentication.ts +0 -122
  223. package/src/generators/init-application/generate-monolithic.spec.ts +0 -45
  224. package/src/generators/init-application/generate-monolithic.ts +0 -57
  225. package/src/generators/init-application/generator.ts +0 -356
  226. package/src/generators/init-application/index.ts +0 -5
  227. package/src/generators/init-application/link-mfe-remote-with-host.ts +0 -60
  228. package/src/generators/init-application/project-i18n-configuration.ts +0 -4
  229. package/src/generators/init-application/update-git-ignore.ts +0 -22
  230. package/src/generators/init-application/update-main-file.ts +0 -118
  231. package/src/generators/init-application/update-project-targets.ts +0 -229
  232. package/src/generators/init-application/update-tags.ts +0 -30
  233. package/src/generators/init-application/update-target-defaults.ts +0 -43
  234. package/src/generators/init-application/update-ts-config.ts +0 -31
  235. package/src/generators/init-component/generator.ts +0 -147
  236. package/src/generators/init-component/index.ts +0 -5
  237. package/src/generators/init-feature/generator.ts +0 -77
  238. package/src/generators/init-feature/index.ts +0 -5
  239. package/src/generators/init-feature-library/generator.ts +0 -82
  240. package/src/generators/init-feature-library/index.ts +0 -5
  241. package/src/generators/init-feature-library/init-project.ts +0 -53
  242. package/src/generators/init-feature-library/init-workspace.ts +0 -10
  243. package/src/generators/init-library/check-if-secondary-entrypoint-include-in-the-ts-config.ts +0 -46
  244. package/src/generators/init-library/cleanup.ts +0 -22
  245. package/src/generators/init-library/coerce-projects.ts +0 -118
  246. package/src/generators/init-library/coerce-tailwind-theme-scss.ts +0 -27
  247. package/src/generators/init-library/extend-angular-specific-eslint.ts +0 -37
  248. package/src/generators/init-library/generator.ts +0 -87
  249. package/src/generators/init-library/has-index-scss.ts +0 -14
  250. package/src/generators/init-library/has-tailwind-config.ts +0 -9
  251. package/src/generators/init-library/index.ts +0 -5
  252. package/src/generators/init-library/init-project.ts +0 -46
  253. package/src/generators/init-library/init-workspace.ts +0 -26
  254. package/src/generators/init-library/is-ng-packagr-project.ts +0 -9
  255. package/src/generators/init-library/ng-package-json.ts +0 -23
  256. package/src/generators/init-library/set-general-target-defaults.ts +0 -36
  257. package/src/generators/init-library/update-package-json.ts +0 -26
  258. package/src/generators/init-library/update-project-ng-package-configuration.ts +0 -51
  259. package/src/generators/init-library/update-ts-config.ts +0 -24
  260. package/src/generators/schematic/generator.ts +0 -179
  261. package/src/generators/schematic/index.ts +0 -5
  262. package/src/i18n.ts +0 -130
  263. package/src/lib/angular-version.ts +0 -1
  264. package/src/lib/coerce-cypress-component-testing.ts +0 -113
  265. package/src/lib/coerce-test-setup.ts +0 -60
  266. package/src/library.ts +0 -153
  267. package/src/migrations/update-19-0-0/add-m2-prefix-to-material-scss-functions.ts +0 -32
  268. package/src/migrations/update-19-0-0/migration.ts +0 -283
  269. package/src/test-setup.ts +0 -24
  270. package/tsconfig.json +0 -20
  271. package/tsconfig.lib.json +0 -10
  272. package/tsconfig.spec.json +0 -15
  273. package/tsconfig.typedoc.json +0 -5
  274. /package/src/{index.ts → index.d.ts} +0 -0
@@ -1,115 +0,0 @@
1
- # {{packageJson.name}}
2
- {{#if packageJson.description ~}}
3
- > {{packageJson.description}}
4
- {{/if}}
5
-
6
- [![npm version](https://img.shields.io/npm/v/{{packageJson.name}}?style=flat-square)](https://www.npmjs.com/package/{{packageJson.name}})
7
- [![commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](https://commitizen.github.io/cz-cli/)
8
- [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
9
- ![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/{{packageJson.name}})
10
- ![npm](https://img.shields.io/npm/dm/{{packageJson.name}})
11
- ![NPM](https://img.shields.io/npm/l/{{packageJson.name}})
12
-
13
- - [Installation](#installation)
14
- {{#if getStartedContent ~}}
15
- - [Get started](#get-started)
16
- {{/if}}
17
- {{#if guidesContent ~}}
18
- - [Guides](#guides)
19
- {{/if}}
20
- {{#if hasGenerators ~}}
21
- - [Generators](#generators)
22
- {{/if}}
23
- {{#if hasExecutors ~}}
24
- - [Executors](#executors)
25
- {{/if}}
26
-
27
- # Installation
28
-
29
- **Add the package to your workspace:**
30
- ```bash
31
- yarn add {{packageJson.name}}
32
- ```
33
- {{#if hasPeerDependencies ~}}
34
-
35
- **Install peer dependencies:**
36
- ```bash
37
- yarn add {{#each peerDependencyList}}{{this.name}}@{{this.version}} {{/each}}
38
- ```
39
- {{/if}}
40
- {{#if hasInitGenerator ~}}
41
-
42
- **Execute the init generator:**
43
- ```bash
44
- yarn nx g {{packageJson.name}}:init
45
- ```
46
- {{/if}}
47
- {{#if hasConfigGenerator ~}}
48
-
49
- **Execute the config generator to use the package with a project:**
50
- ```bash
51
- yarn nx g {{packageJson.name}}:config [project]
52
- ```
53
- {{/if}}
54
- {{#if getStartedContent ~}}
55
-
56
- # Get started
57
-
58
- {{{getStartedContent}}}
59
- {{/if}}
60
- {{#if guidesContent ~}}
61
-
62
- # Guides
63
-
64
- {{{guidesContent}}}
65
- {{/if}}
66
- {{#if hasGenerators ~}}
67
-
68
- # Generators
69
- {{#each generatorList}}
70
-
71
- ## {{this.name}}
72
- > {{this.description}}
73
-
74
- ```bash
75
- yarn nx g {{@root.packageJson.name}}:{{this.name}}
76
- ```
77
- {{#hasProperties this.schema.properties}}
78
-
79
- Option | Type | Default | Description
80
- --- | --- | --- | ---
81
- {{#each this.schema.properties}}
82
- {{@key}} | {{this.type}} | {{this.default}} | {{this.description}}
83
- {{/each}}
84
- {{/hasProperties}}
85
- {{/each}}
86
- {{/if}}
87
- {{#if hasExecutors ~}}
88
-
89
- # Executors
90
- {{#each executorsList}}
91
-
92
- ## {{this.name}}
93
- > {{this.description}}
94
-
95
- **project.json**
96
- ```json
97
- {
98
- "targets": {
99
- "{{this.name}}": {
100
- "executor": "{{@root.packageJson.name}}:{{this.name}}"
101
- }
102
- }
103
- }
104
- ```
105
- {{#hasProperties this.schema.properties}}
106
-
107
- Option | Type | Default | Description
108
- --- | --- | --- | ---
109
- {{#each this.schema.properties}}
110
- {{@key}} | {{this.type}} | {{this.default}} | {{this.description}}
111
- {{/each}}
112
- {{/hasProperties}}
113
- {{/each}}
114
-
115
- {{/if}}
package/jest.config.ts DELETED
@@ -1,11 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: 'plugin-angular',
4
- preset: '../../../jest.preset.js',
5
- setupFilesAfterEnv: [ '<rootDir>/src/test-setup.ts' ],
6
- transform: {
7
- '^.+\\.[tj]s$': [ 'ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' } ],
8
- },
9
- moduleFileExtensions: [ 'ts', 'js', 'html' ],
10
- coverageDirectory: '../../../coverage/packages/plugin/angular',
11
- };
package/project.json DELETED
@@ -1,68 +0,0 @@
1
- {
2
- "name": "plugin-angular",
3
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/plugin/angular/src",
5
- "projectType": "library",
6
- "tags": ["plugin", "nx", "nx-plugin", "packages"],
7
- "targets": {
8
- "build": {
9
- "executor": "@nx/js:tsc",
10
- "outputs": ["{options.outputPath}"],
11
- "options": {
12
- "outputPath": "dist/packages/plugin/angular",
13
- "main": "packages/plugin/angular/src/index.ts",
14
- "tsConfig": "packages/plugin/angular/tsconfig.lib.json",
15
- "generateExportsField": true,
16
- "additionalEntryPoints": [
17
- "packages/plugin/angular/src/library.ts",
18
- "packages/plugin/angular/src/application.ts",
19
- "packages/plugin/angular/src/i18n.ts"
20
- ],
21
- "assets": [
22
- "packages/plugin/angular/*.md",
23
- {
24
- "input": "./packages/plugin/angular/src",
25
- "glob": "**/!(*.ts)",
26
- "output": "./src"
27
- },
28
- {
29
- "input": "./packages/plugin/angular/src",
30
- "glob": "**/*.d.ts",
31
- "output": "./src"
32
- },
33
- {
34
- "input": "./packages/plugin/angular",
35
- "glob": "generators.json",
36
- "output": "."
37
- },
38
- {
39
- "input": "./packages/plugin/angular",
40
- "glob": "executors.json",
41
- "output": "."
42
- },
43
- {
44
- "input": "./packages/plugin/angular",
45
- "glob": "migrations.json",
46
- "output": "."
47
- },
48
- {
49
- "input": "./packages/plugin/angular/src/migrations",
50
- "glob": "**/!(*.ts|*.js|*.json)",
51
- "output": "./src/migrations"
52
- },
53
- "packages/plugin/angular/docs"
54
- ]
55
- }
56
- },
57
- "lint": {
58
- "options": {
59
- "lintFilePatterns": [
60
- "packages/plugin/angular/**/*.ts",
61
- "packages/plugin/angular/package.json",
62
- "packages/plugin/angular/generators.json",
63
- "packages/plugin/angular/executors.json"
64
- ]
65
- }
66
- }
67
- }
68
- }
package/schematics.yaml DELETED
@@ -1,6 +0,0 @@
1
- - package: "@rxap/plugin-library"
2
- name: init
3
- options: {}
4
- - package: "@rxap/plugin-typedoc"
5
- name: init-library
6
- options: {}
@@ -1,124 +0,0 @@
1
- import {
2
- CreateNodesContextV2,
3
- CreateNodesV2,
4
- ProjectConfiguration,
5
- TargetConfiguration,
6
- } from '@nx/devkit';
7
- import {
8
- FindProjectByPath,
9
- FsTree,
10
- } from '@rxap/workspace-utilities';
11
- import { Optional } from 'nx/src/project-graph/plugins';
12
- import { combineGlobPatterns } from 'nx/src/utils/globs';
13
- import { dirname } from 'path';
14
- import 'colors';
15
-
16
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
17
- export interface PluginOptions {}
18
-
19
- export function normalizeOptions(
20
- options: PluginOptions | undefined,
21
- ): PluginOptions {
22
- return options ?? {};
23
- }
24
-
25
- export const createNodesV2: CreateNodesV2<PluginOptions> = [
26
- combineGlobPatterns([
27
- '**/tsconfig.app.json',
28
- '**/src/main.ts',
29
- '**/src/app/app.module.ts',
30
- '**/src/app/app.component.ts',
31
- '**/src/index.html',
32
- ]),
33
- async (configFilePaths, options, context) => {
34
- const normalizedOptions = normalizeOptions(options);
35
-
36
- const includedConfigFilePaths = await Promise.all(
37
- configFilePaths.map(async (configFilePath) => {
38
- if (
39
- await shouldHaveProjectConfiguration(
40
- configFilePath,
41
- normalizedOptions,
42
- context,
43
- )
44
- ) {
45
- return configFilePath;
46
- }
47
- return undefined;
48
- }),
49
- ).then((configFilePathOrUndefinedList) =>
50
- configFilePathOrUndefinedList.filter((value) => value !== undefined),
51
- );
52
-
53
- const results = await Promise.all(
54
- includedConfigFilePaths.map(async (configFilePath) => {
55
- const [ projectPath, projectConfiguration ] =
56
- await createProjectConfiguration(
57
- configFilePath,
58
- normalizedOptions,
59
- context,
60
- );
61
- return [ configFilePath, projectPath, projectConfiguration ] as [
62
- string,
63
- string,
64
- Optional<ProjectConfiguration, 'root'>
65
- ];
66
- }),
67
- );
68
-
69
- return results.map(
70
- ([ configFilePath, projectPath, projectConfiguration ]) => [
71
- configFilePath,
72
- {
73
- projects: {
74
- [projectPath]: projectConfiguration,
75
- },
76
- },
77
- ],
78
- );
79
- },
80
- ];
81
-
82
- async function shouldHaveProjectConfiguration(
83
- configFilePath: string,
84
- options: PluginOptions,
85
- context: CreateNodesContextV2,
86
- ): Promise<boolean> {
87
- const projectPath = dirname(configFilePath);
88
- const tree = new FsTree(context.workspaceRoot);
89
- if (!FindProjectByPath(tree, projectPath)) {
90
- // console.log(`The folder of the file '${ configFilePath }' is not the root of a project. Skipping`.yellow);
91
- return false;
92
- }
93
- return true;
94
- }
95
-
96
- async function createProjectConfiguration(
97
- configFilePath: string,
98
- options: PluginOptions,
99
- context: CreateNodesContextV2,
100
- ): Promise<[ string, Optional<ProjectConfiguration, 'root'> ]> {
101
- const projectPath = dirname(configFilePath);
102
- const targets: Record<string, TargetConfiguration> = {};
103
- const tree = new FsTree(context.workspaceRoot);
104
- const projectConfiguration = FindProjectByPath(tree, projectPath);
105
-
106
- if (!projectConfiguration) {
107
- throw new Error(`Could not find project in '${ projectPath }'`);
108
- }
109
-
110
- targets['config'] = createConfigTarget();
111
-
112
- return [
113
- projectPath, {
114
- targets,
115
- },
116
- ];
117
- }
118
-
119
- function createConfigTarget(): TargetConfiguration {
120
- return {
121
- executor: '@rxap/plugin-angular:config',
122
- dependsOn: ['build'],
123
- };
124
- }
@@ -1,33 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { readFileFromProjectRoot } from '@rxap/plugin-utilities';
3
- import { CheckNgPackageExecutorSchema } from './schema';
4
-
5
- export default async function runExecutor(
6
- options: CheckNgPackageExecutorSchema,
7
- context: ExecutorContext,
8
- ) {
9
- console.log('Executor ran for CheckNgPackage', options);
10
-
11
- const ngPackage = JSON.parse(readFileFromProjectRoot(context, 'ng-package.json', true));
12
- const { dependencies } = JSON.parse(readFileFromProjectRoot(context, 'package.json', true));
13
-
14
- if (ngPackage.allowedNonPeerDependencies) {
15
- const wrongPackages: string[] = [];
16
- for (const packageName of ngPackage.allowedNonPeerDependencies) {
17
- if (!dependencies[packageName]) {
18
- wrongPackages.push(packageName);
19
- }
20
- }
21
- if (wrongPackages.length) {
22
- console.log(`\x1b[31mSome packages in the allowed non peer dependencies list are not in the package.json dependencies list:\x1b[0m\n - ${ wrongPackages.join(
23
- '\n - ') }`);
24
- return {
25
- success: false,
26
- };
27
- }
28
- }
29
-
30
- return {
31
- success: true,
32
- };
33
- }
@@ -1,74 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { GuessOutputPathFromContext } from '@rxap/plugin-utilities';
3
- import {
4
- deepMerge,
5
- SetToObject,
6
- } from '@rxap/utilities';
7
- import {
8
- existsSync,
9
- readFileSync,
10
- writeFileSync,
11
- } from 'fs';
12
- import { join } from 'path';
13
- import { ConfigExecutorSchema } from './schema';
14
- import 'colors';
15
-
16
- function getContent(key: string) {
17
- const value = process.env[key];
18
- if (value) {
19
- let content: string;
20
- if (value.match(/^(\/[^/\s]*)+\/?$/)) {
21
- content = readFileSync(value).toString('utf-8');
22
- } else {
23
- content = value;
24
- }
25
- try {
26
- return JSON.parse(content);
27
- } catch (e: any) {
28
- throw new Error(`Can not parse config from '${ key }': ${ content }`);
29
- }
30
- }
31
- }
32
-
33
-
34
- export default async function runExecutor(
35
- options: ConfigExecutorSchema,
36
- context: ExecutorContext,
37
- ) {
38
- console.log('Executor ran for Config', options);
39
-
40
- const outputPath = GuessOutputPathFromContext(context);
41
-
42
- let config: any = {};
43
- const configPath = join(outputPath, 'config.json');
44
- if (existsSync(configPath)) {
45
- config = JSON.parse(readFileSync(configPath, 'utf-8'));
46
- }
47
-
48
- for (const key of Object.keys(process.env).filter(key => !!key && key.startsWith('RXAP_CONFIG')).sort((a, b) => a.length - b.length)) {
49
- try {
50
- const content = getContent(key);
51
- const match = key.match(/^RXAP_CONFIG_(.*)/);
52
- if (match) {
53
- const key = match[1].toLowerCase().replace(/_/g, '.');
54
- console.log(`Set config '${ key }'`.grey);
55
- SetToObject(config, key, content);
56
- } else {
57
- console.log('Merge config'.grey);
58
- deepMerge(config, content);
59
- }
60
- } catch (e: any) {
61
- console.error(e.message);
62
- return {
63
- success: false,
64
- error: e.message,
65
- };
66
- }
67
- }
68
-
69
- writeFileSync(configPath, JSON.stringify(config, null, 2));
70
-
71
- return {
72
- success: true,
73
- };
74
- }
@@ -1,198 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import {
3
- GetProjectSourceRoot,
4
- GetProjectTargetOptions,
5
- GuessOutputPathFromTargetString,
6
- } from '@rxap/plugin-utilities';
7
- import {
8
- existsSync,
9
- readFileSync,
10
- writeFileSync,
11
- } from 'fs';
12
- import { copy } from 'fs-extra';
13
- import { glob } from 'glob';
14
- import { compile } from 'handlebars';
15
- import {
16
- basename,
17
- join,
18
- relative,
19
- } from 'path';
20
- import { I18nExecutorSchema } from './schema';
21
-
22
- function getIndexHtmlTemplateFilePath(indexHtmlTemplate: string, context: ExecutorContext) {
23
- if (existsSync(join(context.root, indexHtmlTemplate))) {
24
- return join(context.root, indexHtmlTemplate);
25
- }
26
- if (existsSync(join(context.root, 'shared', indexHtmlTemplate))) {
27
- return join(context.root, 'shared', indexHtmlTemplate);
28
- }
29
- if (existsSync(join(context.root, 'shared', 'angular', indexHtmlTemplate))) {
30
- return join(context.root, 'shared', 'angular', indexHtmlTemplate);
31
- }
32
- const projectSourceRoot = GetProjectSourceRoot(context);
33
- if (existsSync(join(projectSourceRoot, indexHtmlTemplate))) {
34
- return join(projectSourceRoot, indexHtmlTemplate);
35
- }
36
- throw new Error(`Could not find the i18n index html template with path '${ indexHtmlTemplate }'`);
37
- }
38
-
39
- async function createIndexHtml(
40
- options: I18nExecutorSchema,
41
- context: ExecutorContext,
42
- outputPath: string,
43
- ) {
44
- const indexHtmlTemplateFilePath = options.indexHtmlTemplate ?? 'i18n.index.html.hbs';
45
-
46
- if (!indexHtmlTemplateFilePath) {
47
- throw new Error('The i18n index html template path is not defined');
48
- }
49
-
50
- const indexHtmlTemplateAbsoluteFilePath = getIndexHtmlTemplateFilePath(indexHtmlTemplateFilePath, context);
51
-
52
- const indexHtmlTemplateFile = readFileSync(indexHtmlTemplateAbsoluteFilePath).toString('utf-8');
53
-
54
- const indexHtmlTemplate = compile(indexHtmlTemplateFile);
55
-
56
- const indexHtml = indexHtmlTemplate(options);
57
-
58
- const indexHtmlFilePath = join(context.root, outputPath, 'index.html');
59
-
60
- if (existsSync(indexHtmlFilePath)) {
61
- console.warn(`The index.html file already exists in the location: '${ indexHtmlFilePath }'`);
62
- }
63
-
64
- writeFileSync(indexHtmlFilePath, indexHtml);
65
- }
66
-
67
- async function copyFiles(
68
- outputPath: string,
69
- pathList: Array<string | { glob: string, input: string, output: string }>,
70
- ) {
71
- await Promise.all(pathList.map(async assetPath => {
72
- if (typeof assetPath === 'string') {
73
- if (!outputPath) {
74
- throw new Error('The i18n output path is not defined');
75
- }
76
- const assetOutputPath = join(outputPath, basename(assetPath));
77
- try {
78
- await copy(assetPath, assetOutputPath);
79
- } catch (e: any) {
80
- throw new Error(`Could not copy assets '${ assetPath }' to '${ outputPath }': ${ e.message }`);
81
- }
82
- } else {
83
- if (!outputPath) {
84
- throw new Error('The i18n output path is not defined');
85
- }
86
- const assetOutputPath = join(outputPath, assetPath.output);
87
- try {
88
- const files = await glob(assetPath.input + assetPath.glob);
89
- await Promise.all(files.map(file => copy(file, join(assetOutputPath, relative(assetPath.input, file)))));
90
- } catch (e: any) {
91
- throw new Error(`Could not copy assets '${ JSON.stringify(assetPath) }' to '${ outputPath }': ${ e.message }`);
92
- }
93
- }
94
- }));
95
- }
96
-
97
- async function copyAssets(
98
- outputPath: string,
99
- options: I18nExecutorSchema,
100
- context: ExecutorContext,
101
- ) {
102
-
103
- if (Array.isArray(options.assets) && options.assets.length) {
104
- await copyFiles(outputPath, options.assets);
105
- } else if (typeof options.assets === 'boolean' && options.assets) {
106
-
107
- if (!context.target) {
108
- throw new Error('The current builder target is not defined in the context');
109
- }
110
-
111
- if (!context.projectName) {
112
- throw new Error('The current project name is not defined in the context');
113
- }
114
-
115
- const buildOptions = GetProjectTargetOptions(context, context.projectName, 'build');
116
-
117
- if (Array.isArray(buildOptions.assets) && buildOptions.assets.length) {
118
- await copyFiles(outputPath, buildOptions.assets);
119
- } else {
120
- console.info('Skip assets copy. The build target of this project has no assets specified.');
121
- }
122
-
123
- } else {
124
- console.info('Skip assets copy. No assets specified.');
125
- }
126
-
127
- }
128
-
129
- function coerceDefaultLanguage(options: I18nExecutorSchema) {
130
- options.defaultLanguage ??= options.availableLanguages?.[0];
131
- }
132
-
133
- function coerceAvailableLanguages(options: I18nExecutorSchema, context: ExecutorContext) {
134
-
135
- if (!options.availableLanguages) {
136
- const buildTarget = options.buildTarget ?? context.projectName + ':build';
137
- const targetName = buildTarget.split(':')[1];
138
- const buildOptions = GetProjectTargetOptions(
139
- context,
140
- context.projectName,
141
- targetName,
142
- context.configurationName ?? 'production'
143
- );
144
- const localize = buildOptions.localize;
145
- if (localize && Array.isArray(localize) && localize.length) {
146
- options.availableLanguages = localize;
147
- } else if (options.defaultLanguage) {
148
- options.availableLanguages = [ options.defaultLanguage ];
149
- }
150
-
151
- }
152
-
153
- }
154
-
155
- export default async function runExecutor(
156
- options: I18nExecutorSchema,
157
- context: ExecutorContext,
158
- ) {
159
- console.log('Executor ran for I18n', options);
160
-
161
- coerceAvailableLanguages(options, context);
162
-
163
- if (!options.availableLanguages?.length) {
164
- throw new Error('The available languages are not defined');
165
- }
166
-
167
- coerceDefaultLanguage(options);
168
-
169
- if (!options.defaultLanguage) {
170
- throw new Error('The default language is not defined');
171
- }
172
-
173
- const outputPath = GuessOutputPathFromTargetString(context, options.buildTarget);
174
-
175
- try {
176
- await createIndexHtml(options, context, outputPath);
177
- } catch (e: any) {
178
- console.error(`Create index html failed: ${e.message}`);
179
- return {
180
- success: false,
181
- error: e.message,
182
- };
183
- }
184
-
185
- try {
186
- await copyAssets(outputPath, options, context);
187
- } catch (e: any) {
188
- console.error(`Copy assets failed: ${ e.message }`);
189
- return {
190
- success: false,
191
- error: e.message,
192
- };
193
- }
194
-
195
- return {
196
- success: true,
197
- };
198
- }
@@ -1,34 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { GetProjectRoot } from '@rxap/plugin-utilities';
3
- import { join } from 'path';
4
- // @ts-expect-error - Tailwindcss does not have types
5
- import { build } from 'tailwindcss/lib/cli/build';
6
- import { TailwindExecutorSchema } from './schema';
7
-
8
- export default async function runExecutor(options: TailwindExecutorSchema, context: ExecutorContext) {
9
- console.log('Executor ran for Tailwind', options);
10
-
11
- const projectRoot = GetProjectRoot(context);
12
-
13
- const args: Record<string, string | boolean | number> = {
14
- '--config': join(projectRoot, options.config),
15
- '--input': join(projectRoot, options.input),
16
- '--output': join(projectRoot, options.output),
17
- };
18
-
19
- if (options.minify) {
20
- args['--minify'] = true;
21
- }
22
-
23
- console.log('Running Tailwind with args', JSON.stringify(args, undefined, 2));
24
-
25
- await build(args);
26
-
27
- return { success: true };
28
-
29
- // return run({
30
- // cwd: projectRoot,
31
- // command,
32
- // __unparsed__: [],
33
- // }, context);
34
- }