create-packer 1.11.0 → 1.11.3
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/README.md +3 -2
- package/package.json +1 -1
- package/template/react/src/pages/notFound/index.ts +1 -0
- package/template/react/src/pages/notFound/notFound.container.tsx +3 -0
- package/template/react/src/router/index.ts +1 -1
- package/template/react/src/router/{routes.tsx → router.config.tsx} +5 -5
- package/template/react/src/router/router.container.tsx +2 -2
- package/template/react/src/router/{paths.ts → router.paths.ts} +0 -0
- package/template/vue/README.md +12 -16
- package/template/vue/src/main.ts +1 -1
- package/template/vue/src/pages/notFound/index.ts +1 -0
- package/template/vue/src/pages/{cannotAccess/cannotAccess.container.vue → notFound/notFound.container.vue} +0 -0
- package/template/vue/src/{routes → router}/index.ts +4 -5
- package/template/vue/src/{routes/names.ts → router/router.names.ts} +1 -1
- package/template/react/src/pages/cannotAccess/cannotAccess.container.tsx +0 -3
- package/template/react/src/pages/cannotAccess/index.ts +0 -1
- package/template/vue/READEME.md +0 -12
- package/template/vue/src/pages/cannotAccess/index.ts +0 -1
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@ Quickly create project templates。
|
|
|
5
5
|
## QuicklyCreate
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
npx create-packer
|
|
9
|
-
yarn create packer
|
|
8
|
+
npx create-packer -c <. || dirname>
|
|
9
|
+
yarn create packer -c <. || dirname>
|
|
10
|
+
pnpx create-packer -c <. || dirname>
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
## TempInfo
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notFound.container'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './router.container'
|
|
2
|
-
export { default as routePaths } from '
|
|
2
|
+
export { default as routePaths } from '././router.paths'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { lazy } from 'react'
|
|
2
2
|
import { RouteObject } from 'react-router-dom'
|
|
3
|
-
import paths from './paths'
|
|
3
|
+
import paths from './router.paths'
|
|
4
4
|
import Layout from '@/layout'
|
|
5
5
|
import Home from '@/pages/home'
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const NotFound = lazy(() => import('@/pages/notFound'))
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const routerConfig: RouteObject[] = [
|
|
10
10
|
{
|
|
11
11
|
path: paths.root,
|
|
12
12
|
element: <Layout />,
|
|
@@ -19,8 +19,8 @@ const routes: RouteObject[] = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
path: '*',
|
|
22
|
-
element: <
|
|
22
|
+
element: <NotFound />
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
|
|
26
|
-
export default
|
|
26
|
+
export default routerConfig
|
|
File without changes
|
package/template/vue/README.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
|
|
14
|
-
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
|
|
15
|
-
|
|
16
|
-
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
|
|
1
|
+
## Vite + Vue3.x + Typescript
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
- Vite 3.x
|
|
5
|
+
- Vue 3.x
|
|
6
|
+
- Typescript 4.x
|
|
7
|
+
- vue-router 4.x
|
|
8
|
+
- pinia 2.x
|
|
9
|
+
- Tailwindcss 3.x
|
|
10
|
+
- Eslint
|
|
11
|
+
- Prettier
|
|
12
|
+
- Alias @ to <project_root>/src
|
package/template/vue/src/main.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notFound.container.vue'
|
|
File without changes
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
|
2
|
-
import names from './names'
|
|
3
|
-
import Home from '@/pages/Home'
|
|
2
|
+
import names from './router.names'
|
|
4
3
|
|
|
5
4
|
const routes: (RouteRecordRaw & { name: string })[] = [
|
|
6
|
-
{ path: '/', name: names.home, component:
|
|
7
|
-
{ path: '/404', name: names.
|
|
5
|
+
{ path: '/', name: names.home, component: () => import('@/pages/home') },
|
|
6
|
+
{ path: '/404', name: names.notFound, component: () => import('@/pages/notFound') }
|
|
8
7
|
]
|
|
9
8
|
const router = createRouter({
|
|
10
9
|
history: createWebHashHistory(),
|
|
@@ -14,7 +13,7 @@ router.beforeEach(async to => {
|
|
|
14
13
|
if (!Object.values(names).includes(to.name! as string)) {
|
|
15
14
|
return {
|
|
16
15
|
replace: true,
|
|
17
|
-
name: names.
|
|
16
|
+
name: names.notFound
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './cannotAccess.container'
|
package/template/vue/READEME.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './cannotAccess.container.vue'
|