create-packer 1.10.0 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.10.0",
3
+ "version": "1.10.3",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -13,7 +13,7 @@ root.render(
13
13
  <Layout>
14
14
  <Routes>
15
15
  {routes.map(({ path, Component }) => {
16
- return <Route path={path} element={<Component />} />
16
+ return <Route key={path} path={path} element={<Component />} />
17
17
  })}
18
18
  </Routes>
19
19
  </Layout>
@@ -0,0 +1,2 @@
1
+ export { default } from './View'
2
+ export * as LayoutTypes from './typings'
@@ -11,7 +11,7 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
11
11
  <Layout>
12
12
  <Routes>
13
13
  {routes.map(({ path, Component }) => {
14
- return <Route path={path} element={<Component />} />
14
+ return <Route key={path} path={path} element={<Component />} />
15
15
  })}
16
16
  </Routes>
17
17
  </Layout>
@@ -1,7 +1,7 @@
1
- import './home.css'
1
+ import './Home.css'
2
2
 
3
- function App() {
3
+ function Home() {
4
4
  return <div className={'flex justify-center items-center'}>sdfs</div>
5
5
  }
6
6
 
7
- export default App
7
+ export default Home
@@ -0,0 +1 @@
1
+ export { default } from './View'
@@ -1,5 +1,5 @@
1
1
  import type { FunctionComponent } from 'react'
2
- import Home from '@/pages/home'
2
+ import Home from '@/pages/Home'
3
3
 
4
4
  export interface routeType {
5
5
  path: string
@@ -4,12 +4,13 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
+ "prepare": "husky install",
7
8
  "dev": "vite",
8
9
  "build": "vue-tsc --noEmit && vite build",
9
10
  "preview": "vite preview",
10
11
  "format": "prettier --write \"src/**/*.{ts,js,tsx,jsx,vue,css,scss,less}\" \"./package.json\"",
11
- "lint": "eslint ./src/**/*.{tsx,ts,vue} && stylelint ./src/**/*.{css,scss,less}",
12
- "lint:fix": "eslint ./src/**/*.{tsx,ts,vue} --fix && stylelint ./src/**/*.{css,scss,less} --fix",
12
+ "lint": "eslint ./src/**/*.{ts,vue} && stylelint ./src/**/*.{css,scss,less}",
13
+ "lint:fix": "eslint ./src/**/*.{ts,vue} --fix && stylelint ./src/**/*.{css,scss,less} --fix",
13
14
  "cz": "cz",
14
15
  "push": "npm run commit && git push",
15
16
  "commit": "git add . && npm run cz"
@@ -0,0 +1,2 @@
1
+ export * from './controllers'
2
+ export { default } from './View.vue'
@@ -1,4 +1,4 @@
1
1
  import { createApp } from 'vue'
2
- import App from './App/index.vue'
2
+ import App from './App'
3
3
 
4
4
  export default createApp(App)
@@ -0,0 +1 @@
1
+ export { default } from './View.vue'
@@ -1,5 +1,5 @@
1
1
  import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
2
- import Home from '@/pages/Home.vue'
2
+ import Home from '@/pages/Home'
3
3
 
4
4
  const routes: RouteRecordRaw[] = [{ path: '/', component: Home }]
5
5