create-packer 1.12.0 → 1.12.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -15,6 +15,7 @@ dist-ssr
15
15
  # Editor directories and files
16
16
  .vscode/*
17
17
  !.vscode/extensions.json
18
+ .history
18
19
  .idea
19
20
  .DS_Store
20
21
  *.suo
@@ -5,6 +5,7 @@
5
5
  "comment-empty-line-before": "never",
6
6
  "no-empty-source": null,
7
7
  "no-descending-specificity": null,
8
+ "string-quotes": "single",
8
9
  "at-rule-no-unknown": [
9
10
  true,
10
11
  {
@@ -1,3 +1,8 @@
1
1
  {
2
- "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "esbenp.prettier-vscode",
5
+ "stylelint.vscode-stylelint",
6
+ "bradlc.vscode-tailwindcss"
7
+ ]
3
8
  }
@@ -20,46 +20,46 @@
20
20
  "commit": "git add . && npm run cz"
21
21
  },
22
22
  "dependencies": {
23
- "immer": "9.0.15",
24
- "lodash-es": "^4.17.21",
23
+ "immer": "9.0.16",
24
+ "lodash-es": "4.17.21",
25
25
  "react": "18.2.0",
26
26
  "react-dom": "18.2.0",
27
- "react-router-dom": "6.3.0",
28
- "zustand": "4.0.0"
27
+ "react-router-dom": "6.4.3",
28
+ "zustand": "4.1.4"
29
29
  },
30
30
  "devDependencies": {
31
- "@testing-library/dom": "8.14.0",
31
+ "@testing-library/dom": "8.19.0",
32
32
  "@testing-library/jest-dom": "5.16.5",
33
- "@testing-library/react": "13.3.0",
34
- "@testing-library/user-event": "14.4.2",
35
- "@types/jest": "28.1.6",
36
- "@types/lodash-es": "^4.17.6",
37
- "@types/react": "18.0.15",
38
- "@types/react-dom": "18.0.6",
33
+ "@testing-library/react": "13.4.0",
34
+ "@testing-library/user-event": "14.4.3",
35
+ "@types/jest": "29.2.3",
36
+ "@types/lodash-es": "4.17.6",
37
+ "@types/react": "18.0.25",
38
+ "@types/react-dom": "18.0.9",
39
39
  "@types/testing-library__jest-dom": "5.14.5",
40
- "@typescript-eslint/eslint-plugin": "5.32.0",
41
- "@typescript-eslint/parser": "5.32.0",
42
- "@vitejs/plugin-react": "2.0.0",
43
- "autoprefixer": "10.4.8",
40
+ "@typescript-eslint/eslint-plugin": "5.44.0",
41
+ "@typescript-eslint/parser": "5.44.0",
42
+ "@vitejs/plugin-react": "2.2.0",
43
+ "autoprefixer": "10.4.13",
44
44
  "commitizen": "4.2.5",
45
- "cssnano": "5.1.12",
45
+ "cssnano": "5.1.14",
46
46
  "cz-adapter-eslint": "0.3.0",
47
- "eslint": "8.21.0",
48
- "eslint-plugin-prettier": "4.0.0",
49
- "eslint-plugin-react": "7.30.1",
47
+ "eslint": "8.28.0",
48
+ "eslint-plugin-prettier": "4.2.1",
49
+ "eslint-plugin-react": "7.31.11",
50
50
  "eslint-plugin-react-hooks": "4.6.0",
51
- "husky": "8.0.1",
52
- "jest": "28.1.3",
53
- "jest-environment-jsdom": "28.1.3",
54
- "postcss": "8.4.14",
55
- "postcss-import": "14.1.0",
56
- "postcss-nesting": "10.1.10",
51
+ "husky": "8.0.2",
52
+ "jest": "29.3.1",
53
+ "jest-environment-jsdom": "29.3.1",
54
+ "postcss": "8.4.19",
55
+ "postcss-import": "15.0.0",
56
+ "postcss-nesting": "10.2.0",
57
57
  "prettier": "2.7.1",
58
- "stylelint": "14.9.1",
59
- "stylelint-config-standard": "26.0.0",
60
- "tailwindcss": "3.1.8",
61
- "typescript": "4.7.4",
62
- "vite": "3.0.9",
58
+ "stylelint": "14.15.0",
59
+ "stylelint-config-standard": "29.0.0",
60
+ "tailwindcss": "3.2.4",
61
+ "typescript": "4.9.3",
62
+ "vite": "3.2.4",
63
63
  "vite-plugin-eslint": "1.8.1"
64
64
  },
65
65
  "config": {
@@ -0,0 +1,3 @@
1
+ export default function Loading() {
2
+ return <>loading...</>
3
+ }
@@ -0,0 +1 @@
1
+ export { default as Loading } from './Loading'
@@ -1 +1 @@
1
- export { default } from './layout.container'
1
+ export { default as Container } from './layout.container'
@@ -1,10 +1,11 @@
1
- import React from 'react'
1
+ import { Suspense } from 'react'
2
2
  import { Outlet } from 'react-router-dom'
3
+ import { Loading } from './components'
3
4
 
4
5
  export default function Layout() {
5
6
  return (
6
- <div>
7
+ <Suspense fallback={<Loading />}>
7
8
  <Outlet />
8
- </div>
9
+ </Suspense>
9
10
  )
10
11
  }
@@ -1,13 +1,11 @@
1
1
  import React from 'react'
2
2
  import ReactDOM from 'react-dom/client'
3
- import { BrowserRouter } from 'react-router-dom'
4
- import Route from '@/router'
3
+ import { RouterProvider } from 'react-router-dom'
4
+ import { router } from '@/router'
5
5
  import './index.css'
6
6
 
7
7
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
8
8
  <React.StrictMode>
9
- <BrowserRouter>
10
- <Route />
11
- </BrowserRouter>
9
+ <RouterProvider router={router} />
12
10
  </React.StrictMode>
13
11
  )
@@ -1 +1 @@
1
- export { default } from './home.container'
1
+ export { default as Container } from './home.container'
@@ -1 +1 @@
1
- export { default } from './notFound.container'
1
+ export { default as Container } from './notFound.container'
@@ -0,0 +1 @@
1
+ export default {}
@@ -0,0 +1,13 @@
1
+ import { lazy } from 'react'
2
+ import type { RouteObject } from 'react-router-dom'
3
+
4
+ const Home = lazy(() => import('@/pages/home/home.container'))
5
+
6
+ const routes: RouteObject[] = [
7
+ {
8
+ index: true,
9
+ element: <Home />
10
+ }
11
+ ]
12
+
13
+ export default routes
@@ -0,0 +1,2 @@
1
+ export { default as routes } from './home.routes'
2
+ export { default as paths } from './home.paths'
@@ -1,2 +1,2 @@
1
- export { default } from './router.container'
2
1
  export { default as routePaths } from '././router.paths'
2
+ export { default as router } from './router.config'
@@ -1,26 +1,19 @@
1
1
  import { lazy } from 'react'
2
- import { RouteObject } from 'react-router-dom'
2
+ import { createBrowserRouter } from 'react-router-dom'
3
+ import * as home from './home'
3
4
  import paths from './router.paths'
4
- import Layout from '@/layout'
5
- import Home from '@/pages/home'
6
5
 
7
- const NotFound = lazy(() => import('@/pages/notFound'))
6
+ const Layout = lazy(() => import('@/layout/layout.container'))
7
+ const NotFound = lazy(() => import('@/pages/notFound/notFound.container'))
8
8
 
9
- const routerConfig: RouteObject[] = [
9
+ export default createBrowserRouter([
10
10
  {
11
11
  path: paths.root,
12
12
  element: <Layout />,
13
- children: [
14
- {
15
- index: true,
16
- element: <Home />
17
- }
18
- ]
13
+ children: [...home.routes]
19
14
  },
20
15
  {
21
16
  path: '*',
22
17
  element: <NotFound />
23
18
  }
24
- ]
25
-
26
- export default routerConfig
19
+ ])
@@ -1,3 +1,5 @@
1
+ import * as home from './home'
1
2
  export default {
2
- root: '/'
3
+ root: '/',
4
+ ...home.paths
3
5
  }