create-pnpm-cli 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/lib/cli.cjs +62 -8
  2. package/package.json +7 -7
  3. package/template/pnpm-monorepo-typescript/README.md +0 -1
  4. package/template/pnpm-monorepo-typescript/apps/examples/package.json +0 -10
  5. package/template/pnpm-monorepo-typescript/apps/examples/tsconfig.json +0 -12
  6. package/template/pnpm-monorepo-typescript/package.json +0 -15
  7. package/template/pnpm-monorepo-typescript/packages/name/bin/index.js +0 -3
  8. package/template/pnpm-monorepo-typescript/packages/name/package.json +0 -15
  9. package/template/pnpm-monorepo-typescript/packages/name/tsconfig.json +0 -12
  10. package/template/pnpm-monorepo-typescript/pnpm-workspace.yaml +0 -3
  11. package/template/pnpm-monorepo-typescript/prettier.config.cjs +0 -10
  12. package/template/webpack-typescript-react/.env.development +0 -1
  13. package/template/webpack-typescript-react/.env.production +0 -1
  14. package/template/webpack-typescript-react/.eslintrc.js +0 -36
  15. package/template/webpack-typescript-react/README.md +0 -1
  16. package/template/webpack-typescript-react/babel.config.js +0 -38
  17. package/template/webpack-typescript-react/package.json +0 -63
  18. package/template/webpack-typescript-react/postcss.config.js +0 -13
  19. package/template/webpack-typescript-react/prettier.config.js +0 -8
  20. package/template/webpack-typescript-react/public/img/img1.jpg +0 -0
  21. package/template/webpack-typescript-react/public/img/img10.jpg +0 -0
  22. package/template/webpack-typescript-react/public/img/img11.jpg +0 -0
  23. package/template/webpack-typescript-react/public/img/img12.jpg +0 -0
  24. package/template/webpack-typescript-react/public/img/img13.jpg +0 -0
  25. package/template/webpack-typescript-react/public/img/img14.jpg +0 -0
  26. package/template/webpack-typescript-react/public/img/img15.jpg +0 -0
  27. package/template/webpack-typescript-react/public/img/img16.jpg +0 -0
  28. package/template/webpack-typescript-react/public/img/img17.jpg +0 -0
  29. package/template/webpack-typescript-react/public/img/img18.jpg +0 -0
  30. package/template/webpack-typescript-react/public/img/img19.jpg +0 -0
  31. package/template/webpack-typescript-react/public/img/img2.jpg +0 -0
  32. package/template/webpack-typescript-react/public/img/img20.jpg +0 -0
  33. package/template/webpack-typescript-react/public/img/img21.jpg +0 -0
  34. package/template/webpack-typescript-react/public/img/img22.jpg +0 -0
  35. package/template/webpack-typescript-react/public/img/img23.jpg +0 -0
  36. package/template/webpack-typescript-react/public/img/img24.jpg +0 -0
  37. package/template/webpack-typescript-react/public/img/img25.jpg +0 -0
  38. package/template/webpack-typescript-react/public/img/img26.jpg +0 -0
  39. package/template/webpack-typescript-react/public/img/img27.jpg +0 -0
  40. package/template/webpack-typescript-react/public/img/img28.jpg +0 -0
  41. package/template/webpack-typescript-react/public/img/img29.jpg +0 -0
  42. package/template/webpack-typescript-react/public/img/img3.jpg +0 -0
  43. package/template/webpack-typescript-react/public/img/img30.jpg +0 -0
  44. package/template/webpack-typescript-react/public/img/img31.jpg +0 -0
  45. package/template/webpack-typescript-react/public/img/img32.jpg +0 -0
  46. package/template/webpack-typescript-react/public/img/img33.jpg +0 -0
  47. package/template/webpack-typescript-react/public/img/img34.jpg +0 -0
  48. package/template/webpack-typescript-react/public/img/img35.jpg +0 -0
  49. package/template/webpack-typescript-react/public/img/img36.jpg +0 -0
  50. package/template/webpack-typescript-react/public/img/img37.jpg +0 -0
  51. package/template/webpack-typescript-react/public/img/img38.jpg +0 -0
  52. package/template/webpack-typescript-react/public/img/img4.jpg +0 -0
  53. package/template/webpack-typescript-react/public/img/img5.jpg +0 -0
  54. package/template/webpack-typescript-react/public/img/img6.jpg +0 -0
  55. package/template/webpack-typescript-react/public/img/img7.jpg +0 -0
  56. package/template/webpack-typescript-react/public/img/img8.jpg +0 -0
  57. package/template/webpack-typescript-react/public/img/img9.jpg +0 -0
  58. package/template/webpack-typescript-react/scripts/data.js +0 -60
  59. package/template/webpack-typescript-react/src/config/data.ts +0 -197
  60. package/template/webpack-typescript-react/src/config/index.ts +0 -1
  61. package/template/webpack-typescript-react/src/hooks/useImagesViewer.ts +0 -80
  62. package/template/webpack-typescript-react/src/hooks/useWindowWidth.ts +0 -24
  63. package/template/webpack-typescript-react/src/index.tsx +0 -19
  64. package/template/webpack-typescript-react/src/layouts/MainLayout.tsx +0 -9
  65. package/template/webpack-typescript-react/src/layouts/index.ts +0 -1
  66. package/template/webpack-typescript-react/src/pages/home.tsx +0 -17
  67. package/template/webpack-typescript-react/src/pages/image.tsx +0 -24
  68. package/template/webpack-typescript-react/src/pages/masonry.tsx +0 -92
  69. package/template/webpack-typescript-react/src/pages/scroll-view.tsx +0 -36
  70. package/template/webpack-typescript-react/src/pages/virtual-list.tsx +0 -27
  71. package/template/webpack-typescript-react/src/routes/config.tsx +0 -39
  72. package/template/webpack-typescript-react/src/styles/global.css +0 -6
  73. package/template/webpack-typescript-react/src/templates/index.html +0 -12
  74. package/template/webpack-typescript-react/src/types/index.d.ts +0 -4
  75. package/template/webpack-typescript-react/src/utils/index.ts +0 -17
  76. package/template/webpack-typescript-react/tailwind.config.js +0 -8
  77. package/template/webpack-typescript-react/tsconfig.json +0 -21
  78. package/template/webpack-typescript-react/webpack.config.ts +0 -94
  79. package/template/zeropress-typescript/README.md +0 -11
  80. package/template/zeropress-typescript/docs/1./347/254/224/350/256/260/1./347/254/254/344/270/200/345/244/251/1./346/226/207/347/253/240.md +0 -3
  81. package/template/zeropress-typescript/docs/1./347/254/224/350/256/260/2./347/254/254/344/272/214/345/244/251/1./346/226/207/347/253/240.md +0 -3
  82. package/template/zeropress-typescript/docs/index.mdx +0 -3
  83. package/template/zeropress-typescript/package.json +0 -21
  84. package/template/zeropress-typescript/public/logo.jpg +0 -0
  85. package/template/zeropress-typescript/tsconfig.json +0 -5
  86. package/template/zeropress-typescript/zeropress.config.ts +0 -22
@@ -1,94 +0,0 @@
1
- import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin'
2
- import BlurhashWebpackPlugin from 'blurhash-webpack-plugin'
3
- import { config } from 'dotenv'
4
- import HtmlWebpackPlugin from 'html-webpack-plugin'
5
- import MiniCssExtractPlugin from 'mini-css-extract-plugin'
6
- import path from 'path'
7
- import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
8
- import { DefinePlugin } from 'webpack'
9
- import { WebpackConfiguration } from 'webpack-dev-server'
10
-
11
- const isDevelopment = process.env.NODE_ENV !== 'production'
12
-
13
- const env = config({
14
- path: path.join(__dirname, `./.env.${process.env.NODE_ENV}`),
15
- })
16
-
17
- if (env.error) {
18
- console.error('环境变量读取失败')
19
- process.exit(1)
20
- }
21
-
22
- // 用WebpackConfiguration是因为配置中配置了devServer
23
- const webpackConfig: WebpackConfiguration = {
24
- mode: isDevelopment ? 'development' : 'production',
25
- entry: path.join(__dirname, './src/index.tsx'),
26
- output: {
27
- path: path.join(__dirname, './dist'),
28
- filename: '[name].[contenthash:8].js',
29
- chunkFilename: '[id].[contenthash:8].js',
30
- clean: true,
31
- hashFunction: 'xxhash64',
32
- },
33
- resolve: {
34
- extensions: ['.js', '.mjs', '.cjs', '.jsx', '.ts', '.tsx'],
35
- plugins: [new TsconfigPathsPlugin()],
36
- },
37
-
38
- optimization: {
39
- // 最小化 __webpack_require__.u 内容改变的影响,分离webpack runtime文件
40
- runtimeChunk: {
41
- name: 'runtime',
42
- },
43
- // 分包
44
- splitChunks: {
45
- chunks: 'all',
46
- },
47
- },
48
- module: {
49
- rules: [
50
- {
51
- test: /\.css$/,
52
- use: [
53
- isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader,
54
- 'css-loader',
55
- 'postcss-loader',
56
- ],
57
- },
58
- {
59
- test: /\.(jsx?|mjs|cjs|tsx?)$/,
60
- exclude: /node_modules/,
61
- include: path.join(__dirname, 'src'),
62
- use: ['babel-loader', 'thread-loader'],
63
- },
64
- {
65
- test: /\.(png|jpe?g|gif|svg|webp)$/,
66
- type: 'asset/resource',
67
- },
68
- ],
69
- },
70
- plugins: [
71
- new DefinePlugin({ 'process.env': JSON.stringify(env.parsed) }),
72
- new HtmlWebpackPlugin({
73
- template: path.join(__dirname, './src/templates/index.html'),
74
- }),
75
- new MiniCssExtractPlugin({
76
- filename: '[name].[contenthash:8].css',
77
- }),
78
- isDevelopment && new ReactRefreshWebpackPlugin(),
79
- new BlurhashWebpackPlugin(),
80
- ].filter(Boolean),
81
- devServer: {
82
- static: {
83
- directory: path.join(__dirname, './public'), //托管静态资源public文件夹
84
- },
85
- port: 9001,
86
- compress: false,
87
- headers: {
88
- 'Access-Control-Allow-Origin': '*',
89
- },
90
- historyApiFallback: true,
91
- },
92
- }
93
-
94
- export default webpackConfig
@@ -1,11 +0,0 @@
1
- # zeropress模板
2
-
3
- 在docs文件夹中直接新建文件夹
4
-
5
- 第一层为nav,第二层为sidebar,第三层为md文件
6
-
7
- 支持全中文路径
8
-
9
- 使用1或者1.自动排序
10
-
11
- 预览暂时使用npm run serve
@@ -1,3 +0,0 @@
1
- ---
2
- pageType: home
3
- ---
@@ -1,21 +0,0 @@
1
- {
2
- "name": "zeropress",
3
- "description": "",
4
- "scripts": {
5
- "build": "zeropress build",
6
- "serve": "npm run build && serve ./dist"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "ISC",
11
- "dependencies": {
12
- "react": "^18.2.0",
13
- "react-dom": "^18.2.0"
14
- },
15
- "devDependencies": {
16
- "@types/react": "^18.2.43",
17
- "@types/react-dom": "^18.2.17",
18
- "zeropress": "^0.0.24",
19
- "serve": "^14.2.1"
20
- }
21
- }
@@ -1,5 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "jsx": "react-jsx",
4
- },
5
- }
@@ -1,22 +0,0 @@
1
- import { UserConfig } from 'zeropress'
2
-
3
- const config: UserConfig = {
4
- themeConfig: {
5
- nav: [
6
- {
7
- img: '/logo.jpg',
8
- link: '/',
9
- position: 'left',
10
- },
11
- {
12
- dark: true,
13
- },
14
- {
15
- logo: 'github',
16
- link: 'https://github.com/houhongxu/hhxpress',
17
- },
18
- ],
19
- },
20
- }
21
-
22
- export default config