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,15 +0,0 @@
1
- const genBaseConfig = require('./webpack_config/genBaseConfig')
2
- const { merge } = require('webpack-merge')
3
- const genStyleConfig = require('./webpack_config/genStyleConfig')
4
- const webpack = require('webpack')
5
-
6
- module.exports = function (env) {
7
- const config = merge(genBaseConfig(env), genStyleConfig(env))
8
- if (!env.prod) {
9
- config.plugins.push(new webpack.HotModuleReplacementPlugin())
10
- Object.keys(config.entry).forEach(k => {
11
- config.entry[k].unshift('webpack-hot-middleware/client')
12
- })
13
- }
14
- return config
15
- }
@@ -1,14 +0,0 @@
1
- const path = require('path')
2
-
3
- const ROOT = process.cwd()
4
- const SRC = path.join(ROOT, 'src')
5
- const OUTPUT = path.join(ROOT, 'dist')
6
-
7
- module.exports = {
8
- ROOT,
9
- SRC,
10
- OUTPUT,
11
- STATIC_DIR: 'static',
12
- gzip: false,
13
- scopeClassName: '[name]__[local]--[hash:base64:5]'
14
- }
@@ -1,73 +0,0 @@
1
- const config = require('./config')
2
- const path = require('path')
3
- const WebpackBar = require('webpackbar')
4
- const HtmlWebpackPlugin = require('html-webpack-plugin')
5
-
6
- module.exports = function genBaseConfig(env) {
7
- return {
8
- entry: {
9
- index: [path.join(config.SRC, 'index.tsx')]
10
- },
11
- output: {
12
- filename: config.STATIC_DIR + (env.prod ? '/[name].[chunkhash].js' : '/[name].js'),
13
- path: config.OUTPUT,
14
- publicPath: '/',
15
- clean: true
16
- },
17
- bail: true,
18
- mode: env.prod ? 'production' : 'development',
19
- devServer: {
20
- host: 'localhost',
21
- port: 8080,
22
- inline: true,
23
- hot: true,
24
- publicPath: 'http://localhost:8080',
25
- open: true,
26
- historyApiFallback: true,
27
- proxy: {
28
- '/api': {
29
- target: 'http://127.0.0.1:3000',
30
- changeOrigin: true,
31
- secure: false,
32
- pathRewrite: {
33
- '^/api': ''
34
- }
35
- }
36
- }
37
- },
38
- module: {
39
- rules: [
40
- {
41
- test: /\.(js|jsx|ts|tsx)$/,
42
- exclude: /(node_modules|bower_components)/,
43
- loader: 'babel-loader'
44
- },
45
- {
46
- test: /\.(png|svg|jpg|jpeg|gif)$/i,
47
- type: 'asset/resource'
48
- },
49
- {
50
- test: /\.(woff|woff2|eot|ttf|otf)$/i,
51
- type: 'asset/resource'
52
- }
53
- ]
54
- },
55
- plugins: [
56
- new WebpackBar(),
57
- new HtmlWebpackPlugin({
58
- filename: 'index.html',
59
- template: path.resolve(config.SRC, 'index.html')
60
- })
61
- ],
62
- optimization: {
63
- minimize: true
64
- },
65
- resolve: {
66
- extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue', '.json'],
67
- alias: {
68
- '@': config.SRC
69
- },
70
- modules: [path.join(config.ROOT, 'node_modules')]
71
- }
72
- }
73
- }
@@ -1,23 +0,0 @@
1
- const MiniCssExtractPlugin = require('mini-css-extract-plugin')
2
-
3
- module.exports = function genStyleConfig(env) {
4
- return {
5
- module: {
6
- rules: [
7
- {
8
- test: /\.css$/,
9
- use: [
10
- env.prod ? MiniCssExtractPlugin.loader : 'style-loader',
11
- 'css-loader',
12
- 'postcss-loader'
13
- ]
14
- }
15
- ]
16
- },
17
- plugins: [
18
- new MiniCssExtractPlugin({
19
- filename: env.prod ? '[name].[contenthash].css' : '[name].css'
20
- })
21
- ]
22
- }
23
- }
@@ -1,40 +0,0 @@
1
- 'use strict'
2
-
3
- const path = require('path')
4
- const camelcase = require('camelcase')
5
-
6
- // This is a custom Jest transformer turning file imports into filenames.
7
- // http://facebook.github.io/jest/docs/en/webpack.html
8
-
9
- module.exports = {
10
- process(src, filename) {
11
- const assetFilename = JSON.stringify(path.basename(filename))
12
-
13
- if (filename.match(/\.svg$/)) {
14
- // Based on how SVGR generates a component name:
15
- // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
16
- const pascalCaseFilename = camelcase(path.parse(filename).name, {
17
- pascalCase: true
18
- })
19
- const componentName = `Svg${pascalCaseFilename}`
20
- return `const React = require('react');
21
- module.exports = {
22
- __esModule: true,
23
- default: ${assetFilename},
24
- ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
25
- return {
26
- $$typeof: Symbol.for('react.element'),
27
- type: 'svg',
28
- ref: ref,
29
- key: null,
30
- props: Object.assign({}, props, {
31
- children: ${assetFilename}
32
- })
33
- };
34
- }),
35
- };`
36
- }
37
-
38
- return `module.exports = ${assetFilename};`
39
- }
40
- }