@common-stack/generate-plugin 5.0.5-alpha.9 → 6.0.1-alpha.0

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 (307) hide show
  1. package/CHANGELOG.md +1 -85
  2. package/generators.json +15 -0
  3. package/lib/generators/add-backend/files/__tests__/test.ts.template +3 -2
  4. package/lib/generators/add-backend/files/package.json +5 -7
  5. package/lib/generators/add-backend/generator.cjs +5 -4
  6. package/lib/generators/add-backend/generator.cjs.map +1 -1
  7. package/lib/generators/add-backend/generator.mjs +6 -5
  8. package/lib/generators/add-backend/generator.mjs.map +1 -1
  9. package/lib/generators/add-backend/schema.json +6 -4
  10. package/lib/generators/add-browser-package/files/CHANGELOG.md +3119 -0
  11. package/lib/generators/add-browser-package/files/LICENSE +674 -0
  12. package/lib/generators/add-browser-package/files/jest.config.js +8 -0
  13. package/lib/generators/add-browser-package/files/package.json +49 -0
  14. package/lib/generators/add-browser-package/files/rollup.config.mjs +29 -0
  15. package/lib/generators/add-browser-package/files/src/index.ts.template +4 -0
  16. package/lib/generators/add-browser-package/files/src/interfaces/index.ts.template +1 -0
  17. package/lib/generators/add-browser-package/files/src/interfaces/interfaces.ts.template +1 -0
  18. package/lib/generators/add-browser-package/files/src/module.tsx.template +7 -0
  19. package/lib/generators/add-browser-package/files/tsconfig.json +28 -0
  20. package/lib/generators/add-browser-package/files/webpack.config.js +71 -0
  21. package/lib/generators/add-browser-package/generator.cjs +19 -0
  22. package/lib/generators/add-browser-package/generator.cjs.map +1 -0
  23. package/lib/generators/add-browser-package/generator.d.ts +4 -0
  24. package/lib/generators/add-browser-package/generator.mjs +19 -0
  25. package/lib/generators/add-browser-package/generator.mjs.map +1 -0
  26. package/lib/generators/add-browser-package/generator.spec.d.ts +1 -0
  27. package/lib/generators/add-browser-package/schema.json +19 -0
  28. package/lib/generators/add-frontend/generator.cjs +6 -5
  29. package/lib/generators/add-frontend/generator.cjs.map +1 -1
  30. package/lib/generators/add-frontend/generator.mjs +7 -6
  31. package/lib/generators/add-frontend/generator.mjs.map +1 -1
  32. package/lib/generators/add-frontend/schema.json +8 -5
  33. package/lib/generators/add-frontend/templates/package.json +8 -8
  34. package/lib/generators/add-fullstack/files/CHANGELOG.md +20 -0
  35. package/lib/generators/add-fullstack/files/CODE_OF_CONDUCT.md +94 -0
  36. package/lib/generators/add-fullstack/files/Dockerfile +10 -0
  37. package/lib/generators/add-fullstack/files/ISSUES.md +24 -0
  38. package/lib/generators/add-fullstack/files/Jenkinsfile +672 -0
  39. package/lib/generators/add-fullstack/files/LICENSE +21 -0
  40. package/lib/generators/add-fullstack/files/README.md +50 -0
  41. package/lib/generators/add-fullstack/files/ScreenShot.png +0 -0
  42. package/lib/generators/add-fullstack/files/babel.config.js +24 -0
  43. package/lib/generators/add-fullstack/files/build.config.js +32 -0
  44. package/lib/generators/add-fullstack/files/build.config.mjs +37 -0
  45. package/lib/generators/add-fullstack/files/codegen.yml +47 -0
  46. package/lib/generators/add-fullstack/files/commitlint.config.js +6 -0
  47. package/lib/generators/add-fullstack/files/config/development/dev.env.sample +21 -0
  48. package/lib/generators/add-fullstack/files/config/development/settings.json +9 -0
  49. package/lib/generators/add-fullstack/files/config/staging/docker-staging.env.sample +26 -0
  50. package/lib/generators/add-fullstack/files/config/staging/staging.env.sample +20 -0
  51. package/lib/generators/add-fullstack/files/config/test/test.env.sample +9 -0
  52. package/lib/generators/add-fullstack/files/docs/Moleculer.md +10 -0
  53. package/lib/generators/add-fullstack/files/docs/References.md +13 -0
  54. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Adding_New_Modules.md +84 -0
  55. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Desktop_Setup.md +12 -0
  56. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/DoAndDont.md +35 -0
  57. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/GitHooks.md +3 -0
  58. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/HowToContribute.md +14 -0
  59. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/How_to_Run_Various_Options.md +95 -0
  60. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Known_Issues.md +19 -0
  61. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Lint_And_Formatter.md +9 -0
  62. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Project_Setup.md +159 -0
  63. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Dynamically_Render_Components.md +57 -0
  64. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/HOC_With_Render_Props.md +87 -0
  65. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Mongoose_Connection.md +45 -0
  66. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/React_Componet_Extensions.md +11 -0
  67. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/RxJS_notes.md +3 -0
  68. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Styles_With_Type.md +52 -0
  69. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Tutorials.md +12 -0
  70. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/faq.md +17 -0
  71. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/installation_issues.md +9 -0
  72. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/lerna-build-tools.md +504 -0
  73. package/lib/generators/add-fullstack/files/docs/development/CodeContribution/lerna-yarn-workspaces.md +82 -0
  74. package/lib/generators/add-fullstack/files/docs/development/Database/mongodb-test.md +6 -0
  75. package/lib/generators/add-fullstack/files/docs/development/Deployment/How_To_Setup_Jenkins.md +60 -0
  76. package/lib/generators/add-fullstack/files/docs/development/Deployment/JenkinsDeployment.md +16 -0
  77. package/lib/generators/add-fullstack/files/docs/development/Expo/expo-commands.md +5 -0
  78. package/lib/generators/add-fullstack/files/docs/development/Mobile/How_To_Make_Expo_Wrok_With_Monorepos.md +9 -0
  79. package/lib/generators/add-fullstack/files/docs/development/Mobile/React-Native-FAQ.md +4 -0
  80. package/lib/generators/add-fullstack/files/docs/development/Mobile/Run_mobile.md +9 -0
  81. package/lib/generators/add-fullstack/files/husky.config.js +6 -0
  82. package/lib/generators/add-fullstack/files/jenkins_variables.groovy +22 -0
  83. package/lib/generators/add-fullstack/files/jest-mongodb-config.js +12 -0
  84. package/lib/generators/add-fullstack/files/jest-transform-i18next.js +24 -0
  85. package/lib/generators/add-fullstack/files/jest.config.base.js +60 -0
  86. package/lib/generators/add-fullstack/files/jest.config.js +22 -0
  87. package/lib/generators/add-fullstack/files/jest.config.mongodb.js +3 -0
  88. package/lib/generators/add-fullstack/files/lerna.json +48 -0
  89. package/lib/generators/add-fullstack/files/lint-staged.config.js +4 -0
  90. package/lib/generators/add-fullstack/files/nx.json +20 -0
  91. package/lib/generators/add-fullstack/files/package.json +361 -0
  92. package/lib/generators/add-fullstack/files/prettier.config.js +8 -0
  93. package/lib/generators/add-fullstack/files/rollup.config.base.mjs +147 -0
  94. package/lib/generators/add-fullstack/files/tools/.eslintrc +5 -0
  95. package/lib/generators/add-fullstack/files/tools/cli/command-invoker.js +54 -0
  96. package/lib/generators/add-fullstack/files/tools/cli/commands/add-module.js +64 -0
  97. package/lib/generators/add-fullstack/files/tools/cli/commands/delete-module.js +56 -0
  98. package/lib/generators/add-fullstack/files/tools/cli/config.js +11 -0
  99. package/lib/generators/add-fullstack/files/tools/cli/helpers/util.js +76 -0
  100. package/lib/generators/add-fullstack/files/tools/cli.js +31 -0
  101. package/lib/generators/add-fullstack/files/tools/deploy-cli/runUpdateJenkinsfileVersion.js +30 -0
  102. package/lib/generators/add-fullstack/files/tools/deploy-cli/runUpdateVersionWrapper.js +32 -0
  103. package/lib/generators/add-fullstack/files/tools/deploy-cli/runUpdateYamlSettingsWrapper.js +38 -0
  104. package/lib/generators/add-fullstack/files/tools/deploy-cli/updateJenkinsfileVersion.js +62 -0
  105. package/lib/generators/add-fullstack/files/tools/deploy-cli/updateLernaVersion.js +51 -0
  106. package/lib/generators/add-fullstack/files/tools/deploy-cli/updateYamlSettings.js +53 -0
  107. package/lib/generators/add-fullstack/files/tools/deployVersionUpdate.js +39 -0
  108. package/lib/generators/add-fullstack/files/tools/esm-wrapper.js +7 -0
  109. package/lib/generators/add-fullstack/files/tools/get-symlinked-modules.js +44 -0
  110. package/lib/generators/add-fullstack/files/tools/sortPackageJson.mjs +46 -0
  111. package/lib/generators/add-fullstack/files/tools/update-dependency-link.js +107 -0
  112. package/lib/generators/add-fullstack/files/tools/update-dependency-version.js +106 -0
  113. package/lib/generators/add-fullstack/files/tools/webpack/server.config.js +165 -0
  114. package/lib/generators/add-fullstack/files/tools/webpack-util.js +14 -0
  115. package/lib/generators/add-fullstack/files/tools/webpackAppConfig.js +44 -0
  116. package/lib/generators/add-fullstack/files/transform.js +14 -0
  117. package/lib/generators/add-fullstack/files/tsconfig.json +26 -0
  118. package/lib/generators/add-fullstack/files/typings/graphql.d.ts.template +72 -0
  119. package/lib/generators/add-fullstack/files/typings/index.d.ts.template +123 -0
  120. package/lib/generators/add-fullstack/files/values-dev.yaml +74 -0
  121. package/lib/generators/add-fullstack/files/values-prod.yaml +67 -0
  122. package/lib/generators/add-fullstack/files/values-stage.yaml +70 -0
  123. package/lib/generators/add-fullstack/files/values.secret.json +11 -0
  124. package/lib/generators/add-fullstack/generator.cjs +18 -0
  125. package/lib/generators/add-fullstack/generator.cjs.map +1 -0
  126. package/lib/generators/add-fullstack/generator.d.ts +4 -0
  127. package/lib/generators/add-fullstack/generator.mjs +18 -0
  128. package/lib/generators/add-fullstack/generator.mjs.map +1 -0
  129. package/lib/generators/add-fullstack/generator.spec.d.ts +1 -0
  130. package/lib/generators/add-fullstack/schema.json +14 -0
  131. package/lib/generators/add-moleculer/files/CHANGELOG.md +2250 -0
  132. package/lib/generators/add-moleculer/files/Dockerfile +30 -0
  133. package/lib/generators/add-moleculer/files/charts/chart/.helmignore +21 -0
  134. package/lib/generators/add-moleculer/files/charts/chart/Chart.yaml +9 -0
  135. package/lib/generators/add-moleculer/files/charts/chart/values-dev.yaml +13 -0
  136. package/lib/generators/add-moleculer/files/charts/chart/values-prod.yaml +13 -0
  137. package/lib/generators/add-moleculer/files/charts/chart/values-stage.yaml +13 -0
  138. package/lib/generators/add-moleculer/files/draft.toml +61 -0
  139. package/lib/generators/add-moleculer/files/package.json +69 -0
  140. package/lib/generators/add-moleculer/files/rollup.config.mjs +36 -0
  141. package/lib/generators/add-moleculer/files/src/config/env-config.ts.template +20 -0
  142. package/lib/generators/add-moleculer/files/src/config/index.ts.template +1 -0
  143. package/lib/generators/add-moleculer/files/src/env.ts.template +5 -0
  144. package/lib/generators/add-moleculer/files/src/index.ts.template +13 -0
  145. package/lib/generators/add-moleculer/files/src/modules/index.ts.template +4 -0
  146. package/lib/generators/add-moleculer/files/src/modules/module.ts.template +31 -0
  147. package/lib/generators/add-moleculer/files/tsconfig.base.json +28 -0
  148. package/lib/generators/add-moleculer/files/tsconfig.json +16 -0
  149. package/lib/generators/add-moleculer/files/webpack.config.js +58 -0
  150. package/lib/generators/add-moleculer/generator.cjs +19 -0
  151. package/lib/generators/add-moleculer/generator.cjs.map +1 -0
  152. package/lib/generators/add-moleculer/generator.d.ts +4 -0
  153. package/lib/generators/add-moleculer/generator.mjs +19 -0
  154. package/lib/generators/add-moleculer/generator.mjs.map +1 -0
  155. package/lib/generators/add-moleculer/generator.spec.d.ts +1 -0
  156. package/lib/generators/add-moleculer/schema.json +19 -0
  157. package/lib/index.cjs +1 -1
  158. package/lib/index.d.ts +3 -0
  159. package/lib/index.mjs +1 -1
  160. package/lib/utils/index.cjs +6 -8
  161. package/lib/utils/index.cjs.map +1 -1
  162. package/lib/utils/index.d.ts +2 -0
  163. package/lib/utils/index.mjs +6 -8
  164. package/lib/utils/index.mjs.map +1 -1
  165. package/package.json +2 -2
  166. package/rollup.config.mjs +11 -5
  167. package/src/generators/add-backend/generator.spec.ts +1 -1
  168. package/src/generators/add-backend/generator.ts +6 -6
  169. package/src/generators/add-backend/schema.d.ts +1 -1
  170. package/src/generators/add-backend/schema.json +6 -4
  171. package/src/generators/add-browser-package/generator.spec.ts +20 -0
  172. package/src/generators/add-browser-package/generator.ts +23 -0
  173. package/src/generators/add-browser-package/schema.d.ts +4 -0
  174. package/src/generators/add-browser-package/schema.json +19 -0
  175. package/src/generators/add-frontend/generator.spec.ts +1 -1
  176. package/src/generators/add-frontend/generator.ts +6 -6
  177. package/src/generators/add-frontend/schema.d.ts +1 -1
  178. package/src/generators/add-frontend/schema.json +8 -5
  179. package/src/generators/add-fullstack/files/.browserslistrc +3 -0
  180. package/src/generators/add-fullstack/files/.eslintignore +3 -0
  181. package/src/generators/add-fullstack/files/.eslintrc.js +92 -0
  182. package/src/generators/add-fullstack/files/.gitattributes +5 -0
  183. package/src/generators/add-fullstack/files/.markdownlint.json +6 -0
  184. package/src/generators/add-fullstack/files/.markdownlintignore +5 -0
  185. package/src/generators/add-fullstack/files/.travis.yml +18 -0
  186. package/src/generators/add-fullstack/files/CHANGELOG.md +20 -0
  187. package/src/generators/add-fullstack/files/CODE_OF_CONDUCT.md +94 -0
  188. package/src/generators/add-fullstack/files/Dockerfile +10 -0
  189. package/src/generators/add-fullstack/files/ISSUES.md +24 -0
  190. package/src/generators/add-fullstack/files/Jenkinsfile +672 -0
  191. package/src/generators/add-fullstack/files/LICENSE +21 -0
  192. package/src/generators/add-fullstack/files/README.md +50 -0
  193. package/src/generators/add-fullstack/files/ScreenShot.png +0 -0
  194. package/src/generators/add-fullstack/files/babel.config.js +24 -0
  195. package/src/generators/add-fullstack/files/build.config.js +32 -0
  196. package/src/generators/add-fullstack/files/build.config.mjs +37 -0
  197. package/src/generators/add-fullstack/files/codegen.yml +47 -0
  198. package/src/generators/add-fullstack/files/commitlint.config.js +6 -0
  199. package/src/generators/add-fullstack/files/config/development/dev.env.sample +21 -0
  200. package/src/generators/add-fullstack/files/config/development/settings.json +9 -0
  201. package/src/generators/add-fullstack/files/config/staging/docker-staging.env.sample +26 -0
  202. package/src/generators/add-fullstack/files/config/staging/staging.env.sample +20 -0
  203. package/src/generators/add-fullstack/files/config/test/test.env.sample +9 -0
  204. package/src/generators/add-fullstack/files/docs/Moleculer.md +10 -0
  205. package/src/generators/add-fullstack/files/docs/References.md +13 -0
  206. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Adding_New_Modules.md +84 -0
  207. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Desktop_Setup.md +12 -0
  208. package/src/generators/add-fullstack/files/docs/development/CodeContribution/DoAndDont.md +35 -0
  209. package/src/generators/add-fullstack/files/docs/development/CodeContribution/GitHooks.md +3 -0
  210. package/src/generators/add-fullstack/files/docs/development/CodeContribution/HowToContribute.md +14 -0
  211. package/src/generators/add-fullstack/files/docs/development/CodeContribution/How_to_Run_Various_Options.md +95 -0
  212. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Known_Issues.md +19 -0
  213. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Lint_And_Formatter.md +9 -0
  214. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Project_Setup.md +159 -0
  215. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Dynamically_Render_Components.md +57 -0
  216. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/HOC_With_Render_Props.md +87 -0
  217. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Mongoose_Connection.md +45 -0
  218. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/React_Componet_Extensions.md +11 -0
  219. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/RxJS_notes.md +3 -0
  220. package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Styles_With_Type.md +52 -0
  221. package/src/generators/add-fullstack/files/docs/development/CodeContribution/Tutorials.md +12 -0
  222. package/src/generators/add-fullstack/files/docs/development/CodeContribution/faq.md +17 -0
  223. package/src/generators/add-fullstack/files/docs/development/CodeContribution/installation_issues.md +9 -0
  224. package/src/generators/add-fullstack/files/docs/development/CodeContribution/lerna-build-tools.md +504 -0
  225. package/src/generators/add-fullstack/files/docs/development/CodeContribution/lerna-yarn-workspaces.md +82 -0
  226. package/src/generators/add-fullstack/files/docs/development/Database/mongodb-test.md +6 -0
  227. package/src/generators/add-fullstack/files/docs/development/Deployment/How_To_Setup_Jenkins.md +60 -0
  228. package/src/generators/add-fullstack/files/docs/development/Deployment/JenkinsDeployment.md +16 -0
  229. package/src/generators/add-fullstack/files/docs/development/Expo/expo-commands.md +5 -0
  230. package/src/generators/add-fullstack/files/docs/development/Mobile/How_To_Make_Expo_Wrok_With_Monorepos.md +9 -0
  231. package/src/generators/add-fullstack/files/docs/development/Mobile/React-Native-FAQ.md +4 -0
  232. package/src/generators/add-fullstack/files/docs/development/Mobile/Run_mobile.md +9 -0
  233. package/src/generators/add-fullstack/files/husky.config.js +6 -0
  234. package/src/generators/add-fullstack/files/jenkins_variables.groovy +22 -0
  235. package/src/generators/add-fullstack/files/jest-mongodb-config.js +12 -0
  236. package/src/generators/add-fullstack/files/jest-transform-i18next.js +24 -0
  237. package/src/generators/add-fullstack/files/jest.config.base.js +60 -0
  238. package/src/generators/add-fullstack/files/jest.config.js +22 -0
  239. package/src/generators/add-fullstack/files/jest.config.mongodb.js +3 -0
  240. package/src/generators/add-fullstack/files/lerna.json +48 -0
  241. package/src/generators/add-fullstack/files/lint-staged.config.js +4 -0
  242. package/src/generators/add-fullstack/files/nx.json +20 -0
  243. package/src/generators/add-fullstack/files/package.json +361 -0
  244. package/src/generators/add-fullstack/files/prettier.config.js +8 -0
  245. package/src/generators/add-fullstack/files/rollup.config.base.mjs +147 -0
  246. package/src/generators/add-fullstack/files/tools/.eslintrc +5 -0
  247. package/src/generators/add-fullstack/files/tools/cli/command-invoker.js +54 -0
  248. package/src/generators/add-fullstack/files/tools/cli/commands/add-module.js +64 -0
  249. package/src/generators/add-fullstack/files/tools/cli/commands/delete-module.js +56 -0
  250. package/src/generators/add-fullstack/files/tools/cli/config.js +11 -0
  251. package/src/generators/add-fullstack/files/tools/cli/helpers/util.js +76 -0
  252. package/src/generators/add-fullstack/files/tools/cli.js +31 -0
  253. package/src/generators/add-fullstack/files/tools/deploy-cli/runUpdateJenkinsfileVersion.js +30 -0
  254. package/src/generators/add-fullstack/files/tools/deploy-cli/runUpdateVersionWrapper.js +32 -0
  255. package/src/generators/add-fullstack/files/tools/deploy-cli/runUpdateYamlSettingsWrapper.js +38 -0
  256. package/src/generators/add-fullstack/files/tools/deploy-cli/updateJenkinsfileVersion.js +62 -0
  257. package/src/generators/add-fullstack/files/tools/deploy-cli/updateLernaVersion.js +51 -0
  258. package/src/generators/add-fullstack/files/tools/deploy-cli/updateYamlSettings.js +53 -0
  259. package/src/generators/add-fullstack/files/tools/deployVersionUpdate.js +39 -0
  260. package/src/generators/add-fullstack/files/tools/esm-wrapper.js +7 -0
  261. package/src/generators/add-fullstack/files/tools/get-symlinked-modules.js +44 -0
  262. package/src/generators/add-fullstack/files/tools/sortPackageJson.mjs +46 -0
  263. package/src/generators/add-fullstack/files/tools/update-dependency-link.js +107 -0
  264. package/src/generators/add-fullstack/files/tools/update-dependency-version.js +106 -0
  265. package/src/generators/add-fullstack/files/tools/webpack/server.config.js +165 -0
  266. package/src/generators/add-fullstack/files/tools/webpack-util.js +14 -0
  267. package/src/generators/add-fullstack/files/tools/webpackAppConfig.js +44 -0
  268. package/src/generators/add-fullstack/files/transform.js +14 -0
  269. package/src/generators/add-fullstack/files/tsconfig.json +26 -0
  270. package/src/generators/add-fullstack/files/typings/graphql.d.ts.template +72 -0
  271. package/src/generators/add-fullstack/files/typings/index.d.ts.template +123 -0
  272. package/src/generators/add-fullstack/files/values-dev.yaml +74 -0
  273. package/src/generators/add-fullstack/files/values-prod.yaml +67 -0
  274. package/src/generators/add-fullstack/files/values-stage.yaml +70 -0
  275. package/src/generators/add-fullstack/files/values.secret.json +11 -0
  276. package/src/generators/add-fullstack/generator.spec.ts +20 -0
  277. package/src/generators/add-fullstack/generator.ts +22 -0
  278. package/src/generators/add-fullstack/schema.d.ts +3 -0
  279. package/src/generators/add-fullstack/schema.json +14 -0
  280. package/src/generators/add-moleculer/files/.dockerignore +5 -0
  281. package/src/generators/add-moleculer/files/.draft-tasks.toml +0 -0
  282. package/src/generators/add-moleculer/files/.draftignore +4 -0
  283. package/src/generators/add-moleculer/files/CHANGELOG.md +2250 -0
  284. package/src/generators/add-moleculer/files/Dockerfile +30 -0
  285. package/src/generators/add-moleculer/files/charts/chart/.helmignore +21 -0
  286. package/src/generators/add-moleculer/files/charts/chart/Chart.yaml +9 -0
  287. package/src/generators/add-moleculer/files/charts/chart/values-dev.yaml +13 -0
  288. package/src/generators/add-moleculer/files/charts/chart/values-prod.yaml +13 -0
  289. package/src/generators/add-moleculer/files/charts/chart/values-stage.yaml +13 -0
  290. package/src/generators/add-moleculer/files/draft.toml +61 -0
  291. package/src/generators/add-moleculer/files/package.json +69 -0
  292. package/src/generators/add-moleculer/files/rollup.config.mjs +36 -0
  293. package/src/generators/add-moleculer/files/src/config/env-config.ts.template +20 -0
  294. package/src/generators/add-moleculer/files/src/config/index.ts.template +1 -0
  295. package/src/generators/add-moleculer/files/src/env.ts.template +5 -0
  296. package/src/generators/add-moleculer/files/src/index.ts.template +13 -0
  297. package/src/generators/add-moleculer/files/src/modules/index.ts.template +4 -0
  298. package/src/generators/add-moleculer/files/src/modules/module.ts.template +31 -0
  299. package/src/generators/add-moleculer/files/tsconfig.base.json +28 -0
  300. package/src/generators/add-moleculer/files/tsconfig.json +16 -0
  301. package/src/generators/add-moleculer/files/webpack.config.js +58 -0
  302. package/src/generators/add-moleculer/generator.spec.ts +20 -0
  303. package/src/generators/add-moleculer/generator.ts +23 -0
  304. package/src/generators/add-moleculer/schema.d.ts +4 -0
  305. package/src/generators/add-moleculer/schema.json +19 -0
  306. package/src/index.ts +3 -0
  307. package/src/utils/index.ts +8 -0
@@ -0,0 +1,50 @@
1
+ # Full Stack Packages
2
+
3
+ *Fullstack packages to develop and test end to end; to use as packages or work independently.*
4
+
5
+ Purpose:
6
+ ---
7
+ The idea is to create modules for each package so it can work independently as well as integrated to another project as packages.
8
+
9
+ ## Screenshot
10
+ ![screencast](./ScreenShot.png)
11
+
12
+
13
+ Useful commands:
14
+ ---
15
+ |command|Description|
16
+ |--------------------------|-----------|
17
+ |`lerna clean`| - removes the node_modules directory from all packages. |
18
+ |`npm start`| - starts the web server and backend server. Or Use `yarn zen:watch`|
19
+ |`yarn zen:watch`| - starts the web server and backend server in watch mode.|
20
+ |`yarn zen:watch:debug`| - starts the web server and backend server in debug and watch mode.|
21
+ |`yarn watch`| - build the packages in watchmode (Useful for development)|
22
+ |`yarn lerna`| - install external dependencies at the repo root so they're |`lable to all packages.|
23
+ |`yarn build`| - build all the packages|
24
+ |`yarn install`| - runs `lerna` and `build`|
25
+ |`lerna publish`| - publishes packages in the current Lerna project. |
26
+
27
+ Files explained:
28
+ ---
29
+ It uses `lerna.json` for creating the packages structure. Under packages you can create different modules based on its usage. For example:
30
+
31
+ packages - Has the packages to organize the codebase into multi-package repositories.
32
+ sample-core - Core interfaces of the packages which can be shared between server and client.
33
+ sample-platform/server - Core platform interfaces and its implementation code for Server.
34
+ sample-platform/browser - Core platform browser State related code which consists of Redux, Graphql Gql and UI Components.
35
+ sample-platform/react-shared-components - React pure components and containers are defined.
36
+ packages-modules - Has the server and browser side packages designed for a specific module feature.
37
+ servers - Has the servers to organize the codebase into multi-package repositories.
38
+ frontend-server - Frontend Client Server. This is useful to show demo of this package.
39
+ backend-server - Backend apollo server.
40
+
41
+
42
+ ## [Click here for Project Setup](docs/development/CodeContribution/Project_Setup.md)
43
+
44
+ In Order to get started with the development you need to go through the
45
+ documentation first
46
+
47
+ - [Getting Started with lerna](./docs/development/CodeContribution/lerna-build-tools.md)
48
+ - [Running the servers](./docs/development/CodeContribution/How_to_Run_Various_Options.md)
49
+ - [Dos and Dont](./docs/development/CodeContribution/DoAndDont.md)
50
+
@@ -0,0 +1,24 @@
1
+ module.exports = {
2
+ compact: false,
3
+ presets: [
4
+ '@babel/preset-typescript',
5
+ '@babel/preset-react',
6
+ ['@babel/preset-env', { modules: 'commonjs', loose: true }],
7
+ ],
8
+ plugins: [
9
+ '@babel/plugin-transform-modules-commonjs',
10
+ '@babel/plugin-transform-destructuring',
11
+ '@babel/plugin-transform-for-of',
12
+ '@babel/plugin-transform-regenerator',
13
+ '@babel/plugin-transform-runtime',
14
+ '@babel/plugin-syntax-dynamic-import',
15
+ '@babel/plugin-proposal-class-properties',
16
+ ['@babel/plugin-proposal-decorators', { legacy: true }],
17
+ '@babel/plugin-proposal-object-rest-spread',
18
+ ],
19
+ env: {
20
+ production: {
21
+ compact: true,
22
+ },
23
+ },
24
+ };
@@ -0,0 +1,32 @@
1
+ /* eslint-disable no-nested-ternary */
2
+ /* eslint-disable no-underscore-dangle */
3
+ // process.env.ENV_FILE !== null && require('dotenv').config({ path: process.env.ENV_FILE });
4
+
5
+ const __API_SERVER_PORT__ = process.env.GRAPHQL_URL ? new URL(process.env.GRAPHQL_URL).port : 8080;
6
+ const __WEB_SERVER_PORT__ = process.env.LOCAL_BACKEND_URL ? new URL(process.env.LOCAL_BACKEND_URL).port : 3000;
7
+ const __WEB_DEV_SERVER_PORT__ =
8
+ process.env.SSR === 'true' ? 3010 : process.env.CLIENT_URL ? new URL(process.env.CLIENT_URL).port : 3000;
9
+ const __SERVER_PROTOCOL__ = 'http';
10
+ const __LOCAL_SERVER_HOST__ = 'localhost';
11
+ const __GRAPHQL_ENDPOINT__ = process.env.GRAPHQL_URL ? new URL(process.env.GRAPHQL_URL).pathname : '/graphql';
12
+ const config = {
13
+ __SERVER__: false,
14
+ __CLIENT__: true,
15
+ __SSR_BACKEND__: process.env.SSR_BACKEND,
16
+ __SSR__: process.env.SSR === 'true',
17
+ __DEBUGGING__: false,
18
+ __TEST__: false,
19
+ __WEB_DEV_SERVER_PORT__,
20
+ __GRAPHQL_ENDPOINT__,
21
+ __LOCAL_SERVER_HOST__,
22
+ __API_SERVER_PORT__,
23
+ __API_URL__:
24
+ process.env.API_URL ||
25
+ `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__API_SERVER_PORT__}${__GRAPHQL_ENDPOINT__}`,
26
+ __WEBSITE_URL__:
27
+ process.env.WEBSITE_URL || `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__WEB_DEV_SERVER_PORT__}`,
28
+ __BACKEND_URL__:
29
+ process.env.LOCAL_BACKEND_URL || `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__WEB_SERVER_PORT__}`,
30
+ };
31
+
32
+ module.exports = config;
@@ -0,0 +1,37 @@
1
+ /* eslint-disable no-nested-ternary */
2
+ /* eslint-disable no-underscore-dangle */
3
+ import { config as dotenvConfig } from 'dotenv-esm';
4
+
5
+ if (process.env.ENV_FILE !== null) {
6
+ dotenvConfig({ path: process.env.ENV_FILE });
7
+ }
8
+
9
+ const __API_SERVER_PORT__ = process.env.GRAPHQL_URL ? new URL(process.env.GRAPHQL_URL).port : 8080;
10
+ const __WEB_SERVER_PORT__ = process.env.LOCAL_BACKEND_URL ? new URL(process.env.LOCAL_BACKEND_URL).port : 3000;
11
+ const __WEB_DEV_SERVER_PORT__ =
12
+ process.env.SSR === 'true' ? 3010 : process.env.CLIENT_URL ? new URL(process.env.CLIENT_URL).port : 3000;
13
+ const __SERVER_PROTOCOL__ = 'http';
14
+ const __LOCAL_SERVER_HOST__ = 'localhost';
15
+ const __GRAPHQL_ENDPOINT__ = process.env.GRAPHQL_URL ? new URL(process.env.GRAPHQL_URL).pathname : '/graphql';
16
+
17
+ const config = {
18
+ __SERVER__: false,
19
+ __CLIENT__: true,
20
+ __SSR_BACKEND__: process.env.SSR_BACKEND,
21
+ __SSR__: process.env.SSR === 'true',
22
+ __DEBUGGING__: false,
23
+ __TEST__: false,
24
+ __WEB_DEV_SERVER_PORT__,
25
+ __GRAPHQL_ENDPOINT__,
26
+ __LOCAL_SERVER_HOST__,
27
+ __API_SERVER_PORT__,
28
+ __API_URL__:
29
+ process.env.API_URL ||
30
+ `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__API_SERVER_PORT__}${__GRAPHQL_ENDPOINT__}`,
31
+ __WEBSITE_URL__:
32
+ process.env.WEBSITE_URL || `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__WEB_DEV_SERVER_PORT__}`,
33
+ __BACKEND_URL__:
34
+ process.env.LOCAL_BACKEND_URL || `${__SERVER_PROTOCOL__}://${__LOCAL_SERVER_HOST__}:${__WEB_SERVER_PORT__}`,
35
+ };
36
+
37
+ export default config;
@@ -0,0 +1,47 @@
1
+ overwrite: true
2
+ schema: "./servers/backend-server/generated-schema.graphql"
3
+ generates:
4
+ typings/graphql.d.ts:
5
+ schema:
6
+ - "packages-modules/counter/browser/src/apollo-server-n-client/**/*.graphql"
7
+ - packages-modules/counter/server/src/schema/**/*.graphql
8
+ documents: "packages-modules/counter/browser/src/**/*.gql"
9
+ plugins:
10
+ - typescript-graphql-files-modules
11
+ packages-modules/counter/browser/src/generated-models.ts:
12
+ schema:
13
+ - "packages-modules/counter/browser/src/apollo-server-n-client/**/*.graphql"
14
+ - packages-modules/counter/server/src/schema/**/*.graphql
15
+ documents: "packages-modules/counter/browser/src/**/*.gql"
16
+ config:
17
+ noNamespaces: true
18
+ withMutationFn: false
19
+ withHOC: false
20
+ withComponent: false
21
+ noGraphQLTag: true
22
+ plugins:
23
+ - add:
24
+ content: /* tslint:disable */
25
+ - typescript
26
+ - typescript-operations
27
+ - typescript-resolvers
28
+ - typescript-react-apollo
29
+ packages-modules/counter/browser/src/apollo-server-n-client/generated-model.tsx:
30
+ schema:
31
+ - "packages-modules/counter/browser/src/apollo-server-n-client/**/*.graphql"
32
+ - packages-modules/counter/server/src/schema/**/*.graphql
33
+ documents: "packages-modules/counter/browser/src/**/*.gql"
34
+ config:
35
+ withMutationFn: false
36
+ withHOC: false
37
+ withComponent: false
38
+ withHooks: true
39
+ noGraphQLTag: true
40
+ preset: import-types-preset
41
+ presetConfig:
42
+ typesPath: "../generated-models"
43
+ importTypesNamespace: SchemaTypes
44
+ plugins:
45
+ - add:
46
+ content: /* tslint:disable */
47
+ - typescript-react-apollo
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ extends: ['@commitlint/config-conventional'],
3
+ rules: {
4
+ 'header-max-length': [0, 'always', 100], // corresponding to maxHeaderWidth of commitizen
5
+ },
6
+ };
@@ -0,0 +1,21 @@
1
+ #
2
+ # Create `dev.env` file and load following required values
3
+ #
4
+ # Build-time Variables
5
+ BUILD_MODULE_TO_INCLUDE=@sample-stack/counter-module-browser|@sample-stack/assets|@sample-stack/platform-browser
6
+
7
+
8
+ NATS_URL=nats://localhost:4222/
9
+ NATS_USER=test
10
+ NATS_PW=test
11
+ GRAPHQL_URL=http://localhost:8080/graphql
12
+ CLIENT_URL=http://localhost:3000
13
+ ZIPKIN_URL=test
14
+ ZIPKIN_PORT=test
15
+ LOG_LEVEL=trace
16
+ MONGO_URL=mongodb://localhost:27017/sample-stack
17
+ REDIS_CLUSTER_URL='[{"port":6379,"host":"localhost"}]'
18
+ REDIS_URL=redis://localhost:6379
19
+ REDIS_CLUSTER_ENABLED=false
20
+ REDIS_SENTINEL_ENABLED=false
21
+ BACKEND_URL=http://localhost:8080
@@ -0,0 +1,9 @@
1
+ {
2
+ "database": {
3
+ "client": "sqlite3",
4
+ "connection": {
5
+ "filename": "dev-db.sqlite3"
6
+ },
7
+ "useNullAsDefault": true
8
+ }
9
+ }
@@ -0,0 +1,26 @@
1
+ ###
2
+ ### To connect from docker to localhost, if you are using a Mac host, you can use -
3
+ #
4
+ # HOSTNAME= docker.for.mac.host.internal
5
+ # Or
6
+ #
7
+ # HOSTNAME = docker.for.mac.localhost
8
+ ###docker.for.mac.localhost
9
+
10
+ NATS_URL=nats://docker.for.mac.localhost:4222/
11
+ NATS_USER=test
12
+ NATS_PW=test
13
+ GRAPHQL_URL=http://docker.for.mac.localhost:8080/graphql
14
+ LOCAL_GRAPHQL_URL=http://docker.for.mac.localhost:8080/graphql
15
+ CLIENT_URL=http://localhost:3010
16
+ ZIPKIN_URL=test
17
+ ZIPKIN_PORT=test
18
+ LOG_LEVEL=trace
19
+ MONGO_URL=mongodb://docker.for.mac.localhost:27017/sample-stack
20
+ REDIS_CLUSTER_URL='[{"port":6379,"host":"docker.for.mac.localhost"}]'
21
+ REDIS_URL=redis://docker.for.mac.localhost:6379
22
+ REDIS_CLUSTER_ENABLED=false
23
+ REDIS_SENTINEL_ENABLED=false
24
+ BACKEND_URL=http://localhost:8080
25
+ CONNECTION_ID=v1
26
+ LOCAL_BACKEND_URL=http://localhost:3010
@@ -0,0 +1,20 @@
1
+ #
2
+ # Create `dev.env` file and load following required values
3
+ #
4
+ NATS_URL=nats://localhost:4222/
5
+ NATS_USER=test
6
+ NATS_PW=test
7
+ GRAPHQL_URL=http://localhost:8080/graphql
8
+ LOCAL_GRAPHQL_URL=http://localhost:8080/graphql
9
+ CLIENT_URL=http://localhost:3011
10
+ ZIPKIN_URL=test
11
+ ZIPKIN_PORT=test
12
+ LOG_LEVEL=trace
13
+ MONGO_URL=mongodb://localhost:27017/sample-stack
14
+ REDIS_CLUSTER_URL='[{"port":6379,"host":"localhost"}]'
15
+ REDIS_URL=redis://localhost:6379
16
+ REDIS_CLUSTER_ENABLED=false
17
+ REDIS_SENTINEL_ENABLED=false
18
+ BACKEND_URL=http://localhost:8080
19
+ CONNECTION_ID=v1
20
+ LOCAL_BACKEND_URL=http://localhost:3000
@@ -0,0 +1,9 @@
1
+ #
2
+ # Create `test.env` file and load following required values
3
+ #
4
+ MONGO_URL=mongodb://localhost:27017/sample-test
5
+ DB_HOST=localhost
6
+ DB_USER=mysql
7
+ DB_PASSWORD=
8
+ DB_SOCKET_PATH=
9
+ DB_DATABASE=test
@@ -0,0 +1,10 @@
1
+
2
+
3
+ Connecting to moleculer
4
+ ---
5
+
6
+ moleculer connect --ns default
7
+
8
+
9
+ References:
10
+ https://moleculer.services/docs/0.14/moleculer-cli.html
@@ -0,0 +1,13 @@
1
+
2
+
3
+
4
+ Hot Reload in Apollo Server 2
5
+ --
6
+ https://github.com/apollographql/apollo-server/issues/1275
7
+
8
+
9
+ To update apollo-server
10
+ ====
11
+ https://github.com/uzh-bf/klicker-uzh/blob/927512043e8b978c5874bb524eac5c5ff321e28b/apps/backend/src/app.js
12
+ https://github.com/heypoom/eventkit/tree/165eb23dc8f3529b46f2cd1f187e4c592d8c9767
13
+ https://github.com/cerino-ligutom/GraphQL-Starter/blob/master/src/graphql/index.ts
@@ -0,0 +1,84 @@
1
+ # Adding Modules with FullStack Pro Kit
2
+
3
+ In this guide, we explain how you can add new modules with FullStack-pro Kit.
4
+
5
+ ## Table of Contents
6
+
7
+ * [Add New Modules](#installing-and-importing-dependencies)
8
+
9
+
10
+ ## Add New Modules
11
+
12
+ Adding new modules, usually goes under `packages-modules` folder. For example to create counter module, you create
13
+
14
+ 1. From root directory, create following folders by running the commands (in unix).
15
+ ```
16
+ mkdir -p packages-modules/counter/browser/src
17
+ mkdir -p packages-modules/counter/servers/src
18
+
19
+ touch packages-modules/counter/browser/src/package.json
20
+ touch packages-modules/counter/servers/src/package.json
21
+ ```
22
+
23
+ 2. Copy following files from the existing modules,
24
+
25
+ From one of the existing moudles, copy the following files into the new module. Make sure the browser's module are copied from another existing browsers location and similarly for server's module.
26
+
27
+ - webpack.config.js
28
+ - tsconfig.json
29
+
30
+
31
+ 3. Copy the content of the package.json for both browser and server from the existing modules and change the `name` in the package.json to the specific name of the module you want to create. Please make sure to keep the namespace of the module uniform, if the existing module have `@sample-stack`, your new browser module's `package.json` name would be `@sample-stack/counter-browser`, similarly for server module will have `@sample-stack/counter-server`.
32
+
33
+ ```json
34
+ {
35
+ "name": "@sample-stack/counter-module-browser",
36
+ "version": "0.0.1",
37
+ .....
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ .....
42
+
43
+ "dependencies": {
44
+ "@sample-stack/platform-browser": "link:../../../packages/sample-platform/browser",
45
+ },
46
+ "peerDependencies": {
47
+ "@common-stack/client-react": ">=0.0.229",
48
+ "@common-stack/core": ">=0.0.229",
49
+ "antd": "^3.26.4"
50
+ }
51
+ }
52
+ ```
53
+ Add any additional dependencies that this module needed.
54
+
55
+ 4. Then, to use the new module add to `servers` and main `package.json`
56
+
57
+ a. In root `package.json` file add the new module where you have existing modules
58
+ ```json
59
+ "dependencies": {
60
+ .....
61
+ "@sample-stack/counter-module-browser": "link:packages-modules/counter/browser",
62
+ "@sample-stack/counter-module-server": "link:packages-modules/counter/server",
63
+ ....
64
+ }
65
+ ```
66
+ b. In frontend server `servers/frontend-server` add the browser module with relative path.
67
+ ```json
68
+ "dependencies": {
69
+ .....
70
+ "@sample-stack/counter-module-browser": "link:../../packages-modules/counter/browser",
71
+ }
72
+ ```
73
+ c. In backend servers `servers/backend-server` add the server module with relative path.
74
+ ```json
75
+ "dependencies": {
76
+ ....
77
+ "@sample-stack/counter-module-server": "link:../../packages-modules/counter/server",
78
+ ....
79
+ }
80
+ ```
81
+
82
+ Notes:
83
+
84
+ - You may have to rerun `yarn watch` to pickup new modules
@@ -0,0 +1,12 @@
1
+
2
+ # Follow steps to [install project](./Project_Setup.md)
3
+
4
+ ### Start Desktop application
5
+
6
+ Before to start desktop application, make sure to start the backend server of the web application first.
7
+
8
+ `lerna exec --scope=*backend-server yarn watch`
9
+
10
+ And then start desktop application.
11
+
12
+ `lerna exec --scope=*desktop yarn watch`
@@ -0,0 +1,35 @@
1
+
2
+
3
+
4
+ Don't do it...
5
+ ---
6
+ 1. `yarn <package>`
7
+
8
+ Do not install dependencies as `yarn <package dependency>`.
9
+ We use `lerna` and the way it works for the project is by installing `dependencies` to the `packages` or `servers` that requires it. In most cases,
10
+ you can just add the package to frontend or backend by running following
11
+
12
+ > to add to the frontend server so browser gets it
13
+
14
+ `lerna add --scope=*fronted-server <package>`
15
+
16
+
17
+ > to add to the backend server for nodejs to use it
18
+
19
+ `lerna add --scope=*backend-server <package>`
20
+
21
+ If a dependency is just needed by one package, you can add to that package's package.json file
22
+
23
+ `lerna add --scope=<package name> <package>`
24
+
25
+ Ideally, root `package.json` should have all the `devDependencies` of the project while `packages` & `servers` file references should be under `dependencies` section as shown [here](https://github.com/cdmbase/fullstack-pro/blob/master/package.json#L67-L78).
26
+
27
+ Sometimes we may need to `pin` a package as other dependencies can bring some older versions of the package we want to add. In that case we can pin the required package version by adding to the `pacakge.json`. But make sure you don't have different version of the package in `servers` or `packages` otherwise a duplciate package will be added to its `nodemodules`.
28
+
29
+ Do
30
+ ---
31
+ 1. Each package version should be uniform across the repository
32
+
33
+ Before adding a `<package dependency>`, see if the package of different version exist. If it exist then update that version to the required version.
34
+
35
+ 2. You can edit one of the `packages` or `servers`'s `package.json` file directly to add a `dependencies` and then run `yarn lerna` to install them. This is a easy way to install a known version by adding to the target `pacakage.json` file.
@@ -0,0 +1,3 @@
1
+ ### Git Hooks
2
+
3
+ `Husky` executes `lint-staged` and `commitlint` by git hooks. `lint-staged` makes sure staged files are to be formatted before committed. Refer to `package.json` for details.
@@ -0,0 +1,14 @@
1
+
2
+ How to contribute as a developer?
3
+ --
4
+
5
+ 1. Once you setup the project, switch to `develop` branch.
6
+ 2. Create a new branch using `develop` branch as source based on the issue you working.
7
+ 3. Update changes to that branch and create a PR agains `develop` branch.
8
+ 4. As soon as PR is created, we have a build process that runs in the background to check whether it is successful or failed.
9
+ 5. If it successfull you will see a green check otherwise a red cross. When you notice it has red cross then run `yarn build` locally and fix any issues and submit the commit again to check it's updated status.
10
+
11
+
12
+
13
+ Note: `master` branch is read-only branch and we don't want to merge anything to it other than that from `develop` branch. So please avoid creating PRs agains master branch.
14
+
@@ -0,0 +1,95 @@
1
+ ## SETUP and INSTALL
2
+ ### To Install the project and build all packages
3
+
4
+ `yarn bootstrap`
5
+
6
+ ### To clean install the project of already installed.
7
+
8
+ If you need to do a clean the existing node_modules and take latest changes from the remote head
9
+
10
+ `yarn clean:install`
11
+
12
+ ## LINTING
13
+ ### To check linting
14
+
15
+ `yarn lint <relative folder>`
16
+
17
+ ### To check and auto fix linting
18
+
19
+ `yarn format <relative folder>`
20
+
21
+ ## PACKAGES COMMANDS
22
+ ### To run build all packages
23
+
24
+ `yarn build`
25
+
26
+ ### To run all packages in watch mode
27
+
28
+ `yarn watch`
29
+
30
+ Note: It only run `packages` and `packages-modules` only in watch mode. Servers should be run seperately.
31
+
32
+ Also check out `yarn watch-packages` to run watch on required packages.
33
+
34
+ ### To run build with watch for dependent packages
35
+
36
+ For auto reloading changes into the server to be productive during development.
37
+
38
+ ```
39
+ yarn watch-packages
40
+ ```
41
+
42
+ If you also need to watch along with it, you can as many scopes as required like below.
43
+
44
+ ```
45
+ yarn watch-packages -- --scope=@sample-stack/counter-module* --scope=@packageb
46
+ ```
47
+
48
+ ## TO START SERVERS
49
+ ### To run a individual package in watch mode
50
+
51
+ `lerna exec --scope=<package name> yarn watch`
52
+
53
+ More details on how to use [lerna exec](https://github.com/lerna/lerna/tree/master/commands/exec#options)
54
+
55
+
56
+ To run any command on a package <package_name>
57
+
58
+ `lerna exec --scope=<package_name> <command>`
59
+
60
+
61
+ ### How to Start Backend and Frontend seperately.
62
+
63
+ To start the frontend-server
64
+
65
+ `lerna exec --scope=*frontend-server yarn watch`
66
+
67
+ To just start the backend-server
68
+
69
+ `lerna exec --scope=*backend-server yarn watch`
70
+
71
+ ### To run both Frontend and Backend Server
72
+
73
+ `yarn start`
74
+
75
+ ### To run both Frontend and Backend Server but start frontend in SSR Mode
76
+
77
+ `yarn start:envSSR`
78
+
79
+
80
+ ### To run Frontend with production build in development
81
+
82
+ build the package
83
+
84
+ `lerna exec --scope=*frontend-server yarn build`
85
+
86
+ start the server with `dev` environment file
87
+
88
+ `lerna exec --scope=*frontend-server yarn start:dev`
89
+
90
+ Make sure backend is also running in seperate terminal
91
+
92
+ `lerna exec --scope=*backend-server yarn watch`
93
+
94
+
95
+
@@ -0,0 +1,19 @@
1
+
2
+
3
+ # Kown Issues
4
+
5
+
6
+ 1. EACCES: permission denied, scandir .....
7
+
8
+ Follow the workaround https://github.com/cdmbase/fullstack-pro/issues/176
9
+
10
+ 2. OS X: "Error: EMFILE: too many open files, watch"
11
+ Follow https://github.com/facebook/create-react-app/issues/4540
12
+
13
+ ```
14
+ brew install watchman
15
+ ```
16
+
17
+ 3. Macbook Catalina: `Zsh` latest macos comes with `Zsh` as the default shell. We seeing some issues to start the project with it. Please use `bash` to run project.
18
+
19
+ https://www.howtogeek.com/444596/how-to-change-the-default-shell-to-bash-in-macos-catalina/
@@ -0,0 +1,9 @@
1
+ ### Lint and Formatter
2
+
3
+ `eslint` and `prettier` is used along each other. `eslint-config-airbnb-base` (not `eslint-config-airbnb`, which includes `jsx` rules) is used as well. [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest/issues) and [`eslint-plugin-markdown`](https://github.com/eslint/eslint-plugin-markdown) (not for markdown itself, but for code block snippet appeared in markdown) are also configured.
4
+
5
+ By configuring `overrides` in `.eslintrc.js`, both of typescript and javascript files are able to be linted by `eslint`. (e.g. So typescript rules are not applied to `.js` files.)
6
+
7
+ [`markdownlint`](https://github.com/DavidAnson/markdownlint) is configured by [`markdownlint-cli`](https://github.com/igorshubovych/markdownlint-cli#readme).
8
+
9
+ [`commitlint`](https://github.com/conventional-changelog/commitlint) is used as commit message linter. You can `yarn lint:md .`, for example. Refer to [conventional commits](https://www.conventionalcommits.org/en/) for more details.