create-lik-app 1.0.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.mjs +73 -73
- package/package.json +2 -3
- package/templates/template-react/_gitignore +3 -0
- package/templates/template-react/{plugins/index.ts → config/build/_base.ts} +16 -4
- package/templates/template-react/config/build/development.ts +7 -0
- package/templates/template-react/config/build/production.ts +1 -0
- package/templates/template-react/config/build/test.ts +1 -0
- package/templates/template-react/src/components/Lic/index.tsx +1 -1
- package/templates/template-react/src/main.tsx +1 -1
- package/templates/template-react/src/store/index.ts +1 -2
- package/templates/template-react/src/styles/main.css +10 -0
- package/templates/template-react/{types → src/types}/auto-imports.d.ts +21 -0
- package/templates/template-react/src/views/Home/components/React/index.tsx +2 -3
- package/templates/template-react/src/views/Home/index.tsx +0 -1
- package/templates/template-react/src/views/Layout/index.tsx +0 -1
- package/templates/template-react/tsconfig.node.json +1 -6
- package/templates/template-react/vite.config.ts +13 -16
- package/templates/template-react-tanstack-jotai/.husky/commit-msg +6 -0
- package/templates/template-react-tanstack-jotai/.husky/lintstagedrc.cjs +8 -0
- package/templates/template-react-tanstack-jotai/.husky/pre-commit +10 -0
- package/templates/template-react-tanstack-jotai/.prettierignore +13 -0
- package/templates/template-react-tanstack-jotai/.vscode/extensions.json +5 -0
- package/templates/template-react-tanstack-jotai/README.md +40 -0
- package/templates/template-react-tanstack-jotai/_gitignore +27 -0
- package/templates/template-react-tanstack-jotai/commitlint.config.mjs +28 -0
- package/templates/template-react-tanstack-jotai/config/build/_base.ts +38 -0
- package/templates/template-react-tanstack-jotai/config/build/development.ts +7 -0
- package/templates/template-react-tanstack-jotai/config/build/production.ts +1 -0
- package/templates/template-react-tanstack-jotai/config/build/test.ts +1 -0
- package/templates/template-react-tanstack-jotai/config/uno/rules.ts +127 -0
- package/templates/template-react-tanstack-jotai/env/.env +0 -0
- package/templates/template-react-tanstack-jotai/env/.env.development +2 -0
- package/templates/template-react-tanstack-jotai/env/.env.production +1 -0
- package/templates/template-react-tanstack-jotai/eslint.config.mjs +44 -0
- package/templates/template-react-tanstack-jotai/index.html +13 -0
- package/templates/template-react-tanstack-jotai/package.json +52 -0
- package/templates/template-react-tanstack-jotai/prettier.config.mjs +11 -0
- package/templates/template-react-tanstack-jotai/public/lic.svg +1263 -0
- package/templates/template-react-tanstack-jotai/public/react.svg +1 -0
- package/templates/template-react-tanstack-jotai/public/vite.svg +1 -0
- package/templates/template-react-tanstack-jotai/src/assets/react.svg +1 -0
- package/templates/template-react-tanstack-jotai/src/components/Lic/index.tsx +12 -0
- package/templates/template-react-tanstack-jotai/src/libs/gsap/index.ts +6 -0
- package/templates/template-react-tanstack-jotai/src/main.tsx +23 -0
- package/templates/template-react-tanstack-jotai/src/routeTree.gen.ts +145 -0
- package/templates/template-react-tanstack-jotai/src/routes/__root.tsx +11 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout/about.tsx +6 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout/index.tsx +6 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout.tsx +23 -0
- package/templates/template-react-tanstack-jotai/src/store/index.ts +1 -0
- package/templates/template-react-tanstack-jotai/src/store/module/favorite.ts +5 -0
- package/templates/template-react-tanstack-jotai/src/styles/animation.css +8 -0
- package/templates/template-react-tanstack-jotai/src/styles/variable.css +21 -0
- package/templates/template-react-tanstack-jotai/src/types/auto-imports.d.ts +33 -0
- package/templates/template-react-tanstack-jotai/src/types/color.d.ts +1 -0
- package/templates/template-react-tanstack-jotai/src/utils/rainbow-print.ts +10 -0
- package/templates/template-react-tanstack-jotai/src/views/404/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai/src/views/About/index.tsx +7 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/Button/index.tsx +24 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/React/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/Vite/index.tsx +20 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/index.tsx +50 -0
- package/templates/template-react-tanstack-jotai/tsconfig.app.json +36 -0
- package/templates/template-react-tanstack-jotai/tsconfig.json +7 -0
- package/templates/template-react-tanstack-jotai/tsconfig.node.json +24 -0
- package/templates/template-react-tanstack-jotai/types/vite-env.d.ts +10 -0
- package/templates/template-react-tanstack-jotai/uno.config.ts +40 -0
- package/templates/template-react-tanstack-jotai/vite.config.ts +15 -0
- package/templates/template-vue/_gitignore +3 -0
- package/templates/template-vue/config/build/_base.ts +42 -0
- package/templates/template-vue/config/build/development.ts +7 -0
- package/templates/template-vue/config/build/production.ts +1 -0
- package/templates/template-vue/config/build/test.ts +1 -0
- package/templates/template-vue/plugins/index.ts +0 -28
- package/templates/template-vue/src/types/components.d.ts +21 -0
- package/templates/template-vue/tsconfig.node.json +1 -1
- package/templates/template-vue/vite.config.ts +13 -14
- package/templates/template-react/src/store/module/counter.ts +0 -20
- package/templates/template-vue/types/components.d.ts +0 -21
- /package/templates/{template-react/src/styles/mian.css → template-react-tanstack-jotai/src/styles/main.css} +0 -0
- /package/templates/template-vue/{types → src/types}/auto-imports.d.ts +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import type { Plugin } from 'vite'
|
3
|
+
import path from 'node:path'
|
4
|
+
import process from 'node:process'
|
5
|
+
import vue from '@vitejs/plugin-vue'
|
6
|
+
import vueJsx from '@vitejs/plugin-vue-jsx'
|
7
|
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
8
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
9
|
+
import Components from 'unplugin-vue-components/vite'
|
10
|
+
|
11
|
+
const basePlugins: Plugin[] = [
|
12
|
+
vue(),
|
13
|
+
vueJsx(),
|
14
|
+
vueDevTools(),
|
15
|
+
AutoImport({
|
16
|
+
include: [
|
17
|
+
/\.vue$/,
|
18
|
+
/\.vue\?vue/, // .vue
|
19
|
+
],
|
20
|
+
imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
|
21
|
+
// 为true时在项目根目录自动创建
|
22
|
+
dts: 'src/types/auto-imports.d.ts',
|
23
|
+
}),
|
24
|
+
// 按需加载组件
|
25
|
+
Components({
|
26
|
+
// 自动加载的组件目录,默认值为 ['src/components']
|
27
|
+
dirs: ['src/components'],
|
28
|
+
// 组件名称包含目录,防止同名组件冲突
|
29
|
+
directoryAsNamespace: true,
|
30
|
+
// 指定类型声明文件,为true时在项目根目录创建
|
31
|
+
dts: 'src/types/components.d.ts',
|
32
|
+
}),
|
33
|
+
]
|
34
|
+
|
35
|
+
export default defineConfig({
|
36
|
+
plugins: basePlugins,
|
37
|
+
resolve: {
|
38
|
+
alias: {
|
39
|
+
'@': path.resolve(process.cwd(), 'src'),
|
40
|
+
},
|
41
|
+
},
|
42
|
+
})
|
@@ -0,0 +1 @@
|
|
1
|
+
export default {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default {};
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import vue from '@vitejs/plugin-vue'
|
2
|
-
import vueJsx from '@vitejs/plugin-vue-jsx'
|
3
|
-
import vueDevTools from 'vite-plugin-vue-devtools'
|
4
|
-
import AutoImport from 'unplugin-auto-import/vite'
|
5
|
-
import Components from 'unplugin-vue-components/vite'
|
6
|
-
export const createPlugins = () => [
|
7
|
-
vue(),
|
8
|
-
vueJsx(),
|
9
|
-
vueDevTools(),
|
10
|
-
AutoImport({
|
11
|
-
include: [
|
12
|
-
/\.vue$/,
|
13
|
-
/\.vue\?vue/, // .vue
|
14
|
-
],
|
15
|
-
imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
|
16
|
-
// 为true时在项目根目录自动创建
|
17
|
-
dts: 'types/auto-imports.d.ts',
|
18
|
-
}),
|
19
|
-
// 按需加载组件
|
20
|
-
Components({
|
21
|
-
// 自动加载的组件目录,默认值为 ['src/components']
|
22
|
-
dirs: ['src/components'],
|
23
|
-
// 组件名称包含目录,防止同名组件冲突
|
24
|
-
directoryAsNamespace: true,
|
25
|
-
// 指定类型声明文件,为true时在项目根目录创建
|
26
|
-
dts: 'types/components.d.ts',
|
27
|
-
}),
|
28
|
-
]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
// @ts-nocheck
|
3
|
+
// Generated by unplugin-vue-components
|
4
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
5
|
+
export {}
|
6
|
+
|
7
|
+
/* prettier-ignore */
|
8
|
+
declare module 'vue' {
|
9
|
+
export interface GlobalComponents {
|
10
|
+
HelloWorld: typeof import('./../components/HelloWorld.vue')['default']
|
11
|
+
IconsIconCommunity: typeof import('./../components/icons/IconCommunity.vue')['default']
|
12
|
+
IconsIconDocumentation: typeof import('./../components/icons/IconDocumentation.vue')['default']
|
13
|
+
IconsIconEcosystem: typeof import('./../components/icons/IconEcosystem.vue')['default']
|
14
|
+
IconsIconSupport: typeof import('./../components/icons/IconSupport.vue')['default']
|
15
|
+
IconsIconTooling: typeof import('./../components/icons/IconTooling.vue')['default']
|
16
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
17
|
+
RouterView: typeof import('vue-router')['RouterView']
|
18
|
+
TheWelcome: typeof import('./../components/TheWelcome.vue')['default']
|
19
|
+
WelcomeItem: typeof import('./../components/WelcomeItem.vue')['default']
|
20
|
+
}
|
21
|
+
}
|
@@ -1,16 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import { createPlugins } from './plugins'
|
1
|
+
import { defineConfig, loadConfigFromFile, mergeConfig } from 'vite'
|
2
|
+
import _base from './config/build/_base'
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
4
|
+
// https://vite.dev/config/
|
5
|
+
export default defineConfig(async (configEnv) => {
|
6
|
+
if (configEnv.mode === '_base')
|
7
|
+
throw new Error('base config is not allowed to be used directly')
|
8
|
+
|
9
|
+
const re = await loadConfigFromFile(
|
10
|
+
configEnv,
|
11
|
+
`config/build/${configEnv.mode}.ts`,
|
12
|
+
)
|
13
|
+
|
14
|
+
return mergeConfig(_base, re?.config ?? {})
|
16
15
|
})
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { makeObservable, action, observable } from 'mobx'
|
2
|
-
|
3
|
-
class CountStore {
|
4
|
-
count: number = 0
|
5
|
-
constructor() {
|
6
|
-
console.log('countStore cunstructed')
|
7
|
-
makeObservable(this, {
|
8
|
-
count: observable,
|
9
|
-
increment: action
|
10
|
-
})
|
11
|
-
}
|
12
|
-
|
13
|
-
increment(): void {
|
14
|
-
this.count++
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
const countStore = new CountStore()
|
19
|
-
|
20
|
-
export { countStore }
|
@@ -1,21 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
// @ts-nocheck
|
3
|
-
// Generated by unplugin-vue-components
|
4
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
5
|
-
export {}
|
6
|
-
|
7
|
-
/* prettier-ignore */
|
8
|
-
declare module 'vue' {
|
9
|
-
export interface GlobalComponents {
|
10
|
-
HelloWorld: typeof import('./../src/components/HelloWorld.vue')['default']
|
11
|
-
IconsIconCommunity: typeof import('./../src/components/icons/IconCommunity.vue')['default']
|
12
|
-
IconsIconDocumentation: typeof import('./../src/components/icons/IconDocumentation.vue')['default']
|
13
|
-
IconsIconEcosystem: typeof import('./../src/components/icons/IconEcosystem.vue')['default']
|
14
|
-
IconsIconSupport: typeof import('./../src/components/icons/IconSupport.vue')['default']
|
15
|
-
IconsIconTooling: typeof import('./../src/components/icons/IconTooling.vue')['default']
|
16
|
-
RouterLink: typeof import('vue-router')['RouterLink']
|
17
|
-
RouterView: typeof import('vue-router')['RouterView']
|
18
|
-
TheWelcome: typeof import('./../src/components/TheWelcome.vue')['default']
|
19
|
-
WelcomeItem: typeof import('./../src/components/WelcomeItem.vue')['default']
|
20
|
-
}
|
21
|
-
}
|
File without changes
|
File without changes
|