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 CHANGED
@@ -5,8 +5,9 @@ Quickly create project templates。
5
5
  ## QuicklyCreate
6
6
 
7
7
  ```shell
8
- npx create-packer <dirname> -c
9
- yarn create packer <dirname> -c
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.11.0",
3
+ "version": "1.11.3",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -0,0 +1 @@
1
+ export { default } from './notFound.container'
@@ -0,0 +1,3 @@
1
+ export default function NotFound() {
2
+ return <div>404</div>
3
+ }
@@ -1,2 +1,2 @@
1
1
  export { default } from './router.container'
2
- export { default as routePaths } from './paths'
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 CannotAccess = lazy(() => import('@/pages/cannotAccess'))
7
+ const NotFound = lazy(() => import('@/pages/notFound'))
8
8
 
9
- const routes: RouteObject[] = [
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: <CannotAccess />
22
+ element: <NotFound />
23
23
  }
24
24
  ]
25
25
 
26
- export default routes
26
+ export default routerConfig
@@ -1,6 +1,6 @@
1
1
  import { useRoutes } from 'react-router-dom'
2
- import routes from './routes'
2
+ import routerConfig from './router.config'
3
3
 
4
4
  export default function Route() {
5
- return useRoutes(routes)
5
+ return useRoutes(routerConfig)
6
6
  }
@@ -1,16 +1,12 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
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
@@ -1,6 +1,6 @@
1
1
  import app from './app'
2
2
  import { createPinia } from 'pinia'
3
- import router from '@/routes'
3
+ import router from '@/router'
4
4
  import './style.css'
5
5
 
6
6
  app.use(createPinia()).use(router).mount('#app')
@@ -0,0 +1 @@
1
+ export { default } from './notFound.container.vue'
@@ -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: Home },
7
- { path: '/404', name: names.cannotAccess, component: () => import('@/pages/cannotAccess') }
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.cannotAccess
16
+ name: names.notFound
18
17
  }
19
18
  }
20
19
  })
@@ -1,4 +1,4 @@
1
1
  export default {
2
2
  home: 'home',
3
- cannotAccess: '404'
3
+ notFound: '404'
4
4
  }
@@ -1,3 +0,0 @@
1
- export default function CannotAccess() {
2
- return <div>404</div>
3
- }
@@ -1 +0,0 @@
1
- export { default } from './cannotAccess.container'
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
1
- export { default } from './cannotAccess.container.vue'