create-packer 1.7.8 → 1.8.2

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 (241) hide show
  1. package/bin/clis/createTemp.d.ts +5 -0
  2. package/bin/clis/createTemp.js +57 -0
  3. package/bin/index.js +6 -11
  4. package/bin/utils/index.d.ts +3 -1
  5. package/bin/utils/index.js +24 -4
  6. package/package.json +16 -19
  7. package/template/{doc/docusaurus → docusaurus}/.gitignore +0 -0
  8. package/template/{doc/docusaurus → docusaurus}/.prettierignore +0 -0
  9. package/template/{desktop-app/electron/app → docusaurus}/.prettierrc.js +0 -0
  10. package/template/{doc/docusaurus → docusaurus}/README.md +0 -0
  11. package/template/{doc/docusaurus → docusaurus}/babel.config.js +0 -0
  12. package/template/{doc/docusaurus → docusaurus}/blog/2019-05-28-hola.md +0 -0
  13. package/template/{doc/docusaurus → docusaurus}/blog/2019-05-29-hello-world.md +0 -0
  14. package/template/{doc/docusaurus → docusaurus}/blog/2019-05-30-welcome.md +0 -0
  15. package/template/{doc/docusaurus → docusaurus}/docs/doc1/doc1.mdx +0 -0
  16. package/template/{doc/docusaurus → docusaurus}/docs/doc1/doc2.mdx +0 -0
  17. package/template/{doc/docusaurus → docusaurus}/docs/doc1/doc3.mdx +0 -0
  18. package/template/{doc/docusaurus → docusaurus}/docs/doc1/doc4.mdx +0 -0
  19. package/template/{doc/docusaurus → docusaurus}/docs/doc2/doc1.mdx +0 -0
  20. package/template/{doc/docusaurus → docusaurus}/docs/doc2/doc2.mdx +0 -0
  21. package/template/{doc/docusaurus → docusaurus}/docs/doc2/doc3.mdx +0 -0
  22. package/template/{doc/docusaurus → docusaurus}/docs/doc2/mdx4.mdx +0 -0
  23. package/template/{doc/docusaurus → docusaurus}/docusaurus.config.js +0 -0
  24. package/template/{doc/docusaurus → docusaurus}/package.json +19 -19
  25. package/template/{doc/docusaurus → docusaurus}/sidebars.js +0 -0
  26. package/template/{doc/docusaurus → docusaurus}/src/css/custom.css +0 -0
  27. package/template/{doc/docusaurus → docusaurus}/src/pages/index.tsx +0 -0
  28. package/template/{doc/docusaurus → docusaurus}/src/pages/styles.module.css +0 -0
  29. package/template/{doc/docusaurus → docusaurus}/static/.nojekyll +0 -0
  30. package/template/{doc/docusaurus → docusaurus}/static/img/docusaurus.png +0 -0
  31. package/template/{doc/docusaurus → docusaurus}/static/img/favicon.ico +0 -0
  32. package/template/{doc/docusaurus → docusaurus}/static/img/logo.svg +0 -0
  33. package/template/{doc/docusaurus → docusaurus}/static/img/tutorial/docsVersionDropdown.png +0 -0
  34. package/template/{doc/docusaurus → docusaurus}/static/img/tutorial/localeDropdown.png +0 -0
  35. package/template/{doc/docusaurus → docusaurus}/static/img/undraw_docusaurus_mountain.svg +0 -0
  36. package/template/{doc/docusaurus → docusaurus}/static/img/undraw_docusaurus_react.svg +0 -0
  37. package/template/{doc/docusaurus → docusaurus}/static/img/undraw_docusaurus_tree.svg +0 -0
  38. package/template/{doc/docusaurus → docusaurus}/tsconfig.json +0 -0
  39. package/template/nest/.eslintrc.js +25 -0
  40. package/template/nest/.gitignore +35 -0
  41. package/template/nest/.husky/pre-commit +4 -0
  42. package/template/nest/.prettierrc +6 -0
  43. package/template/{node/nest → nest}/README.md +1 -1
  44. package/template/{node/nest → nest}/nest-cli.json +1 -0
  45. package/template/nest/package.json +74 -0
  46. package/template/{node/nest → nest}/src/app.controller.spec.ts +1 -1
  47. package/template/{node/nest → nest}/src/app.controller.ts +0 -0
  48. package/template/{node/nest → nest}/src/app.module.ts +1 -1
  49. package/template/{node/nest → nest}/src/app.service.ts +0 -0
  50. package/template/{node/nest → nest}/src/main.ts +0 -0
  51. package/template/nest/src/utils/transform.interceptor.ts +26 -0
  52. package/template/{node/nest → nest}/test/app.e2e-spec.ts +6 -3
  53. package/template/{node/nest → nest}/test/jest-e2e.json +0 -0
  54. package/template/nest/tsconfig.build.json +5 -0
  55. package/template/{node/nest → nest}/tsconfig.json +7 -1
  56. package/template/{web-app/rc-recoil → react-cra}/.env +0 -0
  57. package/template/{web-app/rc-recoil → react-cra}/.gitignore +0 -0
  58. package/template/react-cra/.husky/pre-commit +4 -0
  59. package/template/{desktop-app/electron/app → react-cra}/.prettierignore +0 -0
  60. package/template/{doc/docusaurus → react-cra}/.prettierrc.js +0 -0
  61. package/template/{web-app/rc-recoil → react-cra}/.stylelintrc.js +0 -0
  62. package/template/{web-app/rc-recoil → react-cra}/README.md +0 -0
  63. package/template/{web-app/rc-recoil → react-cra}/craco.config.js +0 -0
  64. package/template/react-cra/package.json +61 -0
  65. package/template/{web-app/rc-recoil → react-cra}/public/favicon.ico +0 -0
  66. package/template/{web-app/rc-recoil → react-cra}/public/index.html +0 -0
  67. package/template/{web-app/rc-recoil → react-cra}/public/manifest.json +0 -0
  68. package/template/react-cra/src/Layout/index.tsx +8 -0
  69. package/template/{web-app/rc-recoil → react-cra}/src/Layout/typings.ts +0 -0
  70. package/template/{web-app/rc-recoil → react-cra}/src/index.scss +0 -0
  71. package/template/react-cra/src/index.tsx +24 -0
  72. package/template/{web-app/rc-recoil → react-cra}/src/logo.svg +0 -0
  73. package/template/{web-app/rc-recoil → react-cra}/src/pages/home/Home.scss +0 -0
  74. package/template/react-cra/src/pages/home/index.test.tsx +9 -0
  75. package/template/{web-app/rc-recoil → react-cra}/src/pages/home/index.tsx +0 -0
  76. package/template/{web-app/rc-recoil → react-cra}/src/react-app-env.d.ts +0 -0
  77. package/template/{web-app/rc-recoil → react-cra}/src/reportWebVitals.ts +0 -0
  78. package/template/react-cra/src/routes/index.ts +15 -0
  79. package/template/{web-app/rc-recoil → react-cra}/src/setupTests.ts +0 -0
  80. package/template/{web-app/rc-recoil → react-cra}/tsconfig.json +0 -0
  81. package/bin/clis/Create.d.ts +0 -4
  82. package/bin/clis/Create.js +0 -47
  83. package/bin/clis/Project.d.ts +0 -30
  84. package/bin/clis/Project.js +0 -65
  85. package/template/desktop-app/electron/.gitignore +0 -34
  86. package/template/desktop-app/electron/app/.eslintrc +0 -28
  87. package/template/desktop-app/electron/app/.gitignore +0 -19
  88. package/template/desktop-app/electron/app/babel.config.js +0 -19
  89. package/template/desktop-app/electron/app/package.json +0 -106
  90. package/template/desktop-app/electron/app/src/configs/appConfig.ts +0 -8
  91. package/template/desktop-app/electron/app/src/lib/AppWin.ts +0 -17
  92. package/template/desktop-app/electron/app/src/lib/DefaultWin.ts +0 -40
  93. package/template/desktop-app/electron/app/src/main.ts +0 -38
  94. package/template/desktop-app/electron/app/src/utils/updateAction.ts +0 -39
  95. package/template/desktop-app/electron/app/tsconfig.json +0 -20
  96. package/template/desktop-app/electron/app/webpack.config.js +0 -49
  97. package/template/desktop-app/electron/app/yarn.lock +0 -6479
  98. package/template/desktop-app/electron/package.json +0 -20
  99. package/template/desktop-app/electron/utils/package.js +0 -40
  100. package/template/desktop-app/electron/yarn.lock +0 -42
  101. package/template/doc/docusaurus/yarn.lock +0 -9466
  102. package/template/lib/gulp/.eslintrc +0 -40
  103. package/template/lib/gulp/.gitignore +0 -31
  104. package/template/lib/gulp/.prettierignore +0 -7
  105. package/template/lib/gulp/.prettierrc.js +0 -21
  106. package/template/lib/gulp/LICENSE +0 -21
  107. package/template/lib/gulp/README.md +0 -1
  108. package/template/lib/gulp/jest.config.js +0 -8
  109. package/template/lib/gulp/package.json +0 -35
  110. package/template/lib/gulp/scripts/build.js +0 -18
  111. package/template/lib/gulp/src/index.ts +0 -3
  112. package/template/lib/gulp/test/index.test.ts +0 -3
  113. package/template/lib/gulp/tsconfig.json +0 -19
  114. package/template/lib/gulp/yarn.lock +0 -9570
  115. package/template/lib/rollup/.eslintrc +0 -40
  116. package/template/lib/rollup/.gitignore +0 -27
  117. package/template/lib/rollup/.prettierignore +0 -7
  118. package/template/lib/rollup/.prettierrc.js +0 -21
  119. package/template/lib/rollup/LICENSE +0 -21
  120. package/template/lib/rollup/README.md +0 -1
  121. package/template/lib/rollup/jest.config.js +0 -8
  122. package/template/lib/rollup/package.json +0 -35
  123. package/template/lib/rollup/scripts/build.js +0 -8
  124. package/template/lib/rollup/src/index.ts +0 -3
  125. package/template/lib/rollup/test/index.test.ts +0 -3
  126. package/template/lib/rollup/tsconfig.json +0 -21
  127. package/template/lib/rollup/yarn.lock +0 -9570
  128. package/template/node/base/.eslintrc +0 -28
  129. package/template/node/base/.gitignore +0 -15
  130. package/template/node/base/.prettierignore +0 -4
  131. package/template/node/base/.prettierrc.js +0 -20
  132. package/template/node/base/LICENSE +0 -201
  133. package/template/node/base/README.md +0 -9
  134. package/template/node/base/jest.config.js +0 -8
  135. package/template/node/base/package.json +0 -37
  136. package/template/node/base/src/server.ts +0 -0
  137. package/template/node/base/test/server.test.ts +0 -3
  138. package/template/node/base/tsconfig.json +0 -19
  139. package/template/node/base/yarn.lock +0 -4038
  140. package/template/node/nest/.eslintrc.js +0 -24
  141. package/template/node/nest/.gitignore +0 -15
  142. package/template/node/nest/.prettierignore +0 -4
  143. package/template/node/nest/.prettierrc.js +0 -20
  144. package/template/node/nest/package.json +0 -76
  145. package/template/node/nest/src/utils/transform.interceptor.ts +0 -14
  146. package/template/node/nest/tsconfig.build.json +0 -4
  147. package/template/node/nest/yarn.lock +0 -5931
  148. package/template/web-app/rc-recoil/.prettierignore +0 -4
  149. package/template/web-app/rc-recoil/.prettierrc.js +0 -20
  150. package/template/web-app/rc-recoil/package.json +0 -71
  151. package/template/web-app/rc-recoil/src/Layout/index.tsx +0 -12
  152. package/template/web-app/rc-recoil/src/app.store.ts +0 -8
  153. package/template/web-app/rc-recoil/src/index.tsx +0 -23
  154. package/template/web-app/rc-recoil/src/pages/home/home.store.ts +0 -6
  155. package/template/web-app/rc-recoil/src/pages/home/index.test.tsx +0 -15
  156. package/template/web-app/rc-recoil/src/routes/index.ts +0 -11
  157. package/template/web-app/rc-recoil/yarn.lock +0 -12437
  158. package/template/web-app/rc-redux/.env +0 -1
  159. package/template/web-app/rc-redux/.gitignore +0 -30
  160. package/template/web-app/rc-redux/.prettierignore +0 -4
  161. package/template/web-app/rc-redux/.prettierrc.js +0 -20
  162. package/template/web-app/rc-redux/.stylelintrc.js +0 -21
  163. package/template/web-app/rc-redux/README.md +0 -10
  164. package/template/web-app/rc-redux/craco.config.js +0 -14
  165. package/template/web-app/rc-redux/package.json +0 -72
  166. package/template/web-app/rc-redux/public/favicon.ico +0 -0
  167. package/template/web-app/rc-redux/public/index.html +0 -41
  168. package/template/web-app/rc-redux/public/manifest.json +0 -15
  169. package/template/web-app/rc-redux/src/Layout/index.tsx +0 -9
  170. package/template/web-app/rc-redux/src/index.scss +0 -5
  171. package/template/web-app/rc-redux/src/index.tsx +0 -24
  172. package/template/web-app/rc-redux/src/logo.svg +0 -7
  173. package/template/web-app/rc-redux/src/pages/home/Home.scss +0 -0
  174. package/template/web-app/rc-redux/src/pages/home/home.store.ts +0 -7
  175. package/template/web-app/rc-redux/src/pages/home/index.test.tsx +0 -17
  176. package/template/web-app/rc-redux/src/pages/home/index.tsx +0 -10
  177. package/template/web-app/rc-redux/src/react-app-env.d.ts +0 -1
  178. package/template/web-app/rc-redux/src/reportWebVitals.ts +0 -15
  179. package/template/web-app/rc-redux/src/routes/index.ts +0 -11
  180. package/template/web-app/rc-redux/src/serviceWorker.ts +0 -139
  181. package/template/web-app/rc-redux/src/setupTests.ts +0 -5
  182. package/template/web-app/rc-redux/src/store/App.store.ts +0 -9
  183. package/template/web-app/rc-redux/src/store/index.ts +0 -11
  184. package/template/web-app/rc-redux/tsconfig.json +0 -21
  185. package/template/web-app/rc-redux/yarn.lock +0 -12480
  186. package/template/web-app/vue-2.x/.browserslistrc +0 -2
  187. package/template/web-app/vue-2.x/.gitignore +0 -30
  188. package/template/web-app/vue-2.x/.prettierignore +0 -5
  189. package/template/web-app/vue-2.x/.prettierrc.js +0 -20
  190. package/template/web-app/vue-2.x/README.md +0 -29
  191. package/template/web-app/vue-2.x/babel.config.js +0 -3
  192. package/template/web-app/vue-2.x/package.json +0 -31
  193. package/template/web-app/vue-2.x/public/favicon.ico +0 -0
  194. package/template/web-app/vue-2.x/public/index.html +0 -20
  195. package/template/web-app/vue-2.x/src/App.vue +0 -5
  196. package/template/web-app/vue-2.x/src/assets/logo.png +0 -0
  197. package/template/web-app/vue-2.x/src/main.ts +0 -12
  198. package/template/web-app/vue-2.x/src/router/index.ts +0 -21
  199. package/template/web-app/vue-2.x/src/shims-tsx.d.ts +0 -13
  200. package/template/web-app/vue-2.x/src/shims-vue.d.ts +0 -4
  201. package/template/web-app/vue-2.x/src/store/app.ts +0 -19
  202. package/template/web-app/vue-2.x/src/store/index.ts +0 -27
  203. package/template/web-app/vue-2.x/src/views/Home.vue +0 -5
  204. package/template/web-app/vue-2.x/tsconfig.json +0 -22
  205. package/template/web-app/vue-2.x/tslint.json +0 -21
  206. package/template/web-app/vue-2.x/vue.config.js +0 -10
  207. package/template/web-app/vue-2.x/yarn.lock +0 -8128
  208. package/template/web-app/webpack/.editorconfig +0 -14
  209. package/template/web-app/webpack/.gitignore +0 -30
  210. package/template/web-app/webpack/.prettierignore +0 -5
  211. package/template/web-app/webpack/.prettierrc.js +0 -20
  212. package/template/web-app/webpack/.stylelintrc.js +0 -21
  213. package/template/web-app/webpack/LICENSE +0 -191
  214. package/template/web-app/webpack/README.md +0 -4
  215. package/template/web-app/webpack/babel.config.js +0 -17
  216. package/template/web-app/webpack/jest.config.js +0 -27
  217. package/template/web-app/webpack/package.json +0 -85
  218. package/template/web-app/webpack/postcss.config.js +0 -11
  219. package/template/web-app/webpack/src/Layout/index.tsx +0 -9
  220. package/template/web-app/webpack/src/Layout/typings.ts +0 -4
  221. package/template/web-app/webpack/src/global.css +0 -3
  222. package/template/web-app/webpack/src/global.d.ts +0 -8
  223. package/template/web-app/webpack/src/index.html +0 -16
  224. package/template/web-app/webpack/src/index.tsx +0 -20
  225. package/template/web-app/webpack/src/pages/Home/Home.css.json +0 -1
  226. package/template/web-app/webpack/src/pages/Home/Home.module.css +0 -3
  227. package/template/web-app/webpack/src/pages/Home/Home.store.ts +0 -12
  228. package/template/web-app/webpack/src/pages/Home/index.test.tsx +0 -17
  229. package/template/web-app/webpack/src/pages/Home/index.tsx +0 -15
  230. package/template/web-app/webpack/src/pages/Home/typings.ts +0 -1
  231. package/template/web-app/webpack/src/routes/index.ts +0 -16
  232. package/template/web-app/webpack/src/store/App.store.ts +0 -14
  233. package/template/web-app/webpack/src/store/index.ts +0 -11
  234. package/template/web-app/webpack/tsconfig.json +0 -23
  235. package/template/web-app/webpack/tslint.json +0 -21
  236. package/template/web-app/webpack/webpack.config.js +0 -15
  237. package/template/web-app/webpack/webpack_config/config.js +0 -14
  238. package/template/web-app/webpack/webpack_config/genBaseConfig.js +0 -73
  239. package/template/web-app/webpack/webpack_config/genStyleConfig.js +0 -23
  240. package/template/web-app/webpack/webpack_config/jest/fileTransform.js +0 -40
  241. package/template/web-app/webpack/yarn.lock +0 -8474
@@ -1 +0,0 @@
1
- BROWSER=none
@@ -1,30 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- # dependencies
4
- node_modules/
5
- /.pnp
6
- .pnp.js
7
-
8
- # testing
9
- coverage/
10
-
11
- # production
12
- build/
13
- dist/
14
- .vscode
15
- .idea
16
- .history
17
- lib/
18
- es/
19
- types/
20
-
21
- # misc
22
- .DS_Store
23
- .env.local
24
- .env.development.local
25
- .env.test.local
26
- .env.production.local
27
-
28
- npm-debug.log*
29
- yarn-debug.log*
30
- yarn-error.log*
@@ -1,4 +0,0 @@
1
- **/*.md
2
- **/*.svg
3
- **/*.ejs
4
- **/*.html
@@ -1,20 +0,0 @@
1
- // 配置文档: https://prettier.io/docs/en/options.html
2
- // ----------------------------------------------------------------------
3
- module.exports = {
4
- overrides: [
5
- {
6
- files: '.prettierrc',
7
- options: { parser: 'json' }
8
- }
9
- ],
10
- printWidth: 100,
11
- tabWidth: 4,
12
- useTabs: false,
13
- semi: false,
14
- singleQuote: true,
15
- trailingComma: 'none',
16
- bracketSpacing: true,
17
- jsxBracketSameLine: true,
18
- arrowParens: 'avoid',
19
- rangeStart: 0
20
- }
@@ -1,21 +0,0 @@
1
- module.exports = {
2
- extends: 'stylelint-config-standard',
3
- rules: {
4
- indentation: 4,
5
- 'comment-empty-line-before': 'never',
6
- 'no-empty-source': null,
7
- 'no-descending-specificity': null,
8
- 'at-rule-no-unknown': [
9
- true,
10
- {
11
- ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend']
12
- }
13
- ],
14
- 'selector-pseudo-class-no-unknown': [
15
- true,
16
- {
17
- ignorePseudoClasses: ['global']
18
- }
19
- ]
20
- }
21
- }
@@ -1,10 +0,0 @@
1
- # rc-template
2
-
3
- > 基于 create-react-app 搭建的模版
4
-
5
- ## 扩展插件
6
-
7
- - @reduxjs/toolkit
8
- - react-redux
9
- - react-router
10
- - react-router-config
@@ -1,14 +0,0 @@
1
- const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
2
-
3
- const webpackPlugins = []
4
-
5
- if (process.argv[2] === '--analyze') {
6
- webpackPlugins.push(new BundleAnalyzerPlugin())
7
- }
8
-
9
- module.exports = {
10
- webpack: {
11
- alias: {},
12
- plugins: webpackPlugins
13
- }
14
- }
@@ -1,72 +0,0 @@
1
- {
2
- "name": "react_template",
3
- "version": "0.1.0",
4
- "private": true,
5
- "dependencies": {
6
- "@craco/craco": "^6.1.2",
7
- "@reduxjs/toolkit": "^1.6.0",
8
- "@testing-library/jest-dom": "^5.14.1",
9
- "@testing-library/react": "^11.2.7",
10
- "@testing-library/user-event": "^13.1.9",
11
- "@types/jest": "^26.0.23",
12
- "@types/node": "^15.12.2",
13
- "@types/react": "^17.0.11",
14
- "@types/react-dom": "^17.0.7",
15
- "@types/react-redux": "^7.1.16",
16
- "@types/react-router-config": "^5.0.2",
17
- "@types/react-router-dom": "^5.1.7",
18
- "react": "^17.0.2",
19
- "react-dom": "^17.0.2",
20
- "react-redux": "^7.2.4",
21
- "react-router-config": "^5.1.1",
22
- "react-router-dom": "^5.2.0",
23
- "react-scripts": "^4.0.3",
24
- "sass": "^1.34.1",
25
- "typescript": "^4.3.2",
26
- "web-vitals": "^2.0.1"
27
- },
28
- "scripts": {
29
- "start": "craco start",
30
- "build": "craco build",
31
- "analyze": "craco build --analyze",
32
- "test": "craco test",
33
- "eject": "react-scripts eject",
34
- "format": "prettier --write \"src/**/*.{ts,js,tsx,jsx,css,scss,less}\" \"./package.json\""
35
- },
36
- "husky": {
37
- "hooks": {
38
- "pre-commit": "npm run format && lint-staged && git add ."
39
- }
40
- },
41
- "lint-staged": {
42
- "./src/**/*.{css,scss,less}": [
43
- "stylelint"
44
- ]
45
- },
46
- "eslintConfig": {
47
- "extends": [
48
- "react-app",
49
- "react-app/jest"
50
- ]
51
- },
52
- "browserslist": {
53
- "production": [
54
- ">0.2%",
55
- "not dead",
56
- "not op_mini all"
57
- ],
58
- "development": [
59
- "last 1 chrome version",
60
- "last 1 firefox version",
61
- "last 1 safari version"
62
- ]
63
- },
64
- "devDependencies": {
65
- "husky": "^4.3.8",
66
- "lint-staged": "^11.0.0",
67
- "prettier": "^2.3.1",
68
- "stylelint": "^13.13.1",
69
- "stylelint-config-standard": "^22.0.0",
70
- "webpack-bundle-analyzer": "^4.4.2"
71
- }
72
- }
@@ -1,41 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6
- <meta
7
- name="viewport"
8
- content="width=device-width, initial-scale=1, shrink-to-fit=no"
9
- />
10
- <meta name="theme-color" content="#000000" />
11
- <!--
12
- manifest.json provides metadata used when your web app is installed on a
13
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14
- -->
15
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16
- <!--
17
- Notice the use of %PUBLIC_URL% in the tags above.
18
- It will be replaced with the URL of the `public` folder during the build.
19
- Only files inside the `public` folder can be referenced from the HTML.
20
-
21
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22
- work correctly both with client-side routing and a non-root public URL.
23
- Learn how to configure a non-root public URL by running `npm run build`.
24
- -->
25
- <title>React App</title>
26
- </head>
27
- <body>
28
- <noscript>You need to enable JavaScript to run this app.</noscript>
29
- <div id="root"></div>
30
- <!--
31
- This HTML file is a template.
32
- If you open it directly in the browser, you will see an empty page.
33
-
34
- You can add webfonts, meta tags, or analytics to this file.
35
- The build step will place the bundled scripts into the <body> tag.
36
-
37
- To begin the development, run `npm start` or `yarn start`.
38
- To create a production bundle, use `npm run build` or `yarn build`.
39
- -->
40
- </body>
41
- </html>
@@ -1,15 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- }
10
- ],
11
- "start_url": ".",
12
- "display": "standalone",
13
- "theme_color": "#000000",
14
- "background_color": "#ffffff"
15
- }
@@ -1,9 +0,0 @@
1
- import React from 'react'
2
-
3
- export interface LayoutPropsType {}
4
-
5
- const Layout: React.FC<LayoutPropsType> = ({ children }) => {
6
- return <div>{children}</div>
7
- }
8
-
9
- export default Layout
@@ -1,5 +0,0 @@
1
- body {
2
- margin: 0;
3
- padding: 0;
4
- background-color: #fff;
5
- }
@@ -1,24 +0,0 @@
1
- /* eslint-disable */
2
- import React from 'react'
3
- import ReactDOM from 'react-dom'
4
- import { BrowserRouter } from 'react-router-dom'
5
- import { Provider } from 'react-redux'
6
- import store from 'src/store'
7
- import { renderRoutes } from 'react-router-config'
8
- import Layout from './Layout'
9
- import routes from './routes'
10
- import reportWebVitals from './reportWebVitals'
11
- import './index.scss'
12
-
13
- ReactDOM.render(
14
- <React.StrictMode>
15
- <Provider store={store}>
16
- <BrowserRouter>
17
- <Layout>{renderRoutes(routes)}</Layout>
18
- </BrowserRouter>
19
- </Provider>
20
- </React.StrictMode>,
21
- document.getElementById('root')
22
- )
23
-
24
- reportWebVitals()
@@ -1,7 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
2
- <g fill="#61DAFB">
3
- <path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
4
- <circle cx="420.9" cy="296.5" r="45.7"/>
5
- <path d="M520.5 78.1z"/>
6
- </g>
7
- </svg>
@@ -1,7 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit'
2
-
3
- export default createSlice({
4
- name: 'home',
5
- initialState: {},
6
- reducers: {}
7
- })
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom'
3
- import Home from './index'
4
- import { Provider } from 'react-redux'
5
- import homeSlice from './home.store'
6
- import { configureStore } from '@reduxjs/toolkit'
7
-
8
- it('renders without crashing', () => {
9
- const div = document.createElement('div')
10
- ReactDOM.render(
11
- <Provider store={configureStore({ reducer: { [homeSlice.name]: homeSlice.reducer } })}>
12
- <Home />
13
- </Provider>,
14
- div
15
- )
16
- ReactDOM.unmountComponentAtNode(div)
17
- })
@@ -1,10 +0,0 @@
1
- import React from 'react'
2
- import './Home.scss'
3
-
4
- export interface HomePropsType {}
5
-
6
- const App: React.FC<HomePropsType> = () => {
7
- return <div className="home">home</div>
8
- }
9
-
10
- export default App
@@ -1 +0,0 @@
1
- /// <reference types="react-scripts" />
@@ -1,15 +0,0 @@
1
- import { ReportHandler } from 'web-vitals'
2
-
3
- const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
- if (onPerfEntry && onPerfEntry instanceof Function) {
5
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
- getCLS(onPerfEntry)
7
- getFID(onPerfEntry)
8
- getFCP(onPerfEntry)
9
- getLCP(onPerfEntry)
10
- getTTFB(onPerfEntry)
11
- })
12
- }
13
- }
14
-
15
- export default reportWebVitals
@@ -1,11 +0,0 @@
1
- import { RouteConfig } from 'react-router-config'
2
-
3
- const routes: RouteConfig[] = [
4
- {
5
- path: '/',
6
- exact: true,
7
- component: require('../pages/home').default
8
- }
9
- ]
10
-
11
- export default routes
@@ -1,139 +0,0 @@
1
- // This optional code is used to register a service worker.
2
- // register() is not called by default.
3
-
4
- // This lets the app load faster on subsequent visits in production, and gives
5
- // it offline capabilities. However, it also means that developers (and users)
6
- // will only see deployed updates on subsequent visits to a page, after all the
7
- // existing tabs open on the page have been closed, since previously cached
8
- // resources are updated in the background.
9
-
10
- // To learn more about the benefits of this model and instructions on how to
11
- // opt-in, read https://bit.ly/CRA-PWA
12
-
13
- const isLocalhost = Boolean(
14
- window.location.hostname === 'localhost' ||
15
- // [::1] is the IPv6 localhost address.
16
- window.location.hostname === '[::1]' ||
17
- // 127.0.0.1/8 is considered localhost for IPv4.
18
- window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
19
- )
20
-
21
- type Config = {
22
- onSuccess?: (registration: ServiceWorkerRegistration) => void
23
- onUpdate?: (registration: ServiceWorkerRegistration) => void
24
- }
25
-
26
- export function register(config?: Config) {
27
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
28
- // The URL constructor is available in all browsers that support SW.
29
- const publicUrl = new URL(
30
- (process as { env: { [key: string]: string } }).env.PUBLIC_URL,
31
- window.location.href
32
- )
33
- if (publicUrl.origin !== window.location.origin) {
34
- // Our service worker won't work if PUBLIC_URL is on a different origin
35
- // from what our page is served on. This might happen if a CDN is used to
36
- // serve assets; see https://github.com/facebook/create-react-app/issues/2374
37
- return
38
- }
39
-
40
- window.addEventListener('load', () => {
41
- const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`
42
-
43
- if (isLocalhost) {
44
- // This is running on localhost. Let's check if a service worker still exists or not.
45
- checkValidServiceWorker(swUrl, config)
46
-
47
- // Add some additional logging to localhost, pointing developers to the
48
- // service worker/PWA documentation.
49
- navigator.serviceWorker.ready.then(() => {
50
- console.log(
51
- 'This web app is being served cache-first by a service ' +
52
- 'worker. To learn more, visit https://bit.ly/CRA-PWA'
53
- )
54
- })
55
- } else {
56
- // Is not localhost. Just register service worker
57
- registerValidSW(swUrl, config)
58
- }
59
- })
60
- }
61
- }
62
-
63
- function registerValidSW(swUrl: string, config?: Config) {
64
- navigator.serviceWorker
65
- .register(swUrl)
66
- .then(registration => {
67
- registration.onupdatefound = () => {
68
- const installingWorker = registration.installing
69
- if (installingWorker == null) {
70
- return
71
- }
72
- installingWorker.onstatechange = () => {
73
- if (installingWorker.state === 'installed') {
74
- if (navigator.serviceWorker.controller) {
75
- // At this point, the updated precached content has been fetched,
76
- // but the previous service worker will still serve the older
77
- // content until all client tabs are closed.
78
- console.log(
79
- 'New content is available and will be used when all ' +
80
- 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
81
- )
82
-
83
- // Execute callback
84
- if (config && config.onUpdate) {
85
- config.onUpdate(registration)
86
- }
87
- } else {
88
- // At this point, everything has been precached.
89
- // It's the perfect time to display a
90
- // "Content is cached for offline use." message.
91
- console.log('Content is cached for offline use.')
92
-
93
- // Execute callback
94
- if (config && config.onSuccess) {
95
- config.onSuccess(registration)
96
- }
97
- }
98
- }
99
- }
100
- }
101
- })
102
- .catch(error => {
103
- console.error('Error during service worker registration:', error)
104
- })
105
- }
106
-
107
- function checkValidServiceWorker(swUrl: string, config?: Config) {
108
- // Check if the service worker can be found. If it can't reload the page.
109
- fetch(swUrl)
110
- .then(response => {
111
- // Ensure service worker exists, and that we really are getting a JS file.
112
- const contentType = response.headers.get('content-type')
113
- if (
114
- response.status === 404 ||
115
- (contentType != null && contentType.indexOf('javascript') === -1)
116
- ) {
117
- // No service worker found. Probably a different app. Reload the page.
118
- navigator.serviceWorker.ready.then(registration => {
119
- registration.unregister().then(() => {
120
- window.location.reload()
121
- })
122
- })
123
- } else {
124
- // Service worker found. Proceed as normal.
125
- registerValidSW(swUrl, config)
126
- }
127
- })
128
- .catch(() => {
129
- console.log('No internet connection found. App is running in offline mode.')
130
- })
131
- }
132
-
133
- export function unregister() {
134
- if ('serviceWorker' in navigator) {
135
- navigator.serviceWorker.ready.then(registration => {
136
- registration.unregister()
137
- })
138
- }
139
- }
@@ -1,5 +0,0 @@
1
- // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
- // allows you to do things like:
3
- // expect(element).toHaveTextContent(/react/i)
4
- // learn more: https://github.com/testing-library/jest-dom
5
- import '@testing-library/jest-dom'
@@ -1,9 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit'
2
-
3
- export default createSlice({
4
- name: 'app',
5
- initialState: {
6
- APP_NAME: 'project_management'
7
- },
8
- reducers: {}
9
- })
@@ -1,11 +0,0 @@
1
- import { configureStore } from '@reduxjs/toolkit'
2
-
3
- // @ts-ignore
4
- const ctx = require.context('../', true, /\.store\.(js|ts)$/)
5
- const reducer: any = {}
6
- ctx.keys().forEach((path: string) => {
7
- const store: any = ctx(path).default
8
- reducer[store.name] = store.reducer
9
- })
10
-
11
- export default configureStore({ reducer })
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "target": "es5",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "allowJs": true,
7
- "skipLibCheck": true,
8
- "esModuleInterop": true,
9
- "allowSyntheticDefaultImports": true,
10
- "strict": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "module": "esnext",
14
- "moduleResolution": "node",
15
- "resolveJsonModule": true,
16
- "isolatedModules": true,
17
- "noEmit": true,
18
- "jsx": "react-jsx"
19
- },
20
- "include": ["src"]
21
- }