@weapp-core/init 1.0.8 → 1.1.0
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/dist/index.cjs +318 -41
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +303 -33
- package/package.json +5 -3
- package/templates/default/package.json +34 -0
- package/templates/default/postcss.config.js +6 -0
- package/templates/default/project.config.json +42 -0
- package/templates/default/project.private.config.json +7 -0
- package/templates/default/src/app.json +20 -0
- package/templates/default/src/app.scss +3 -0
- package/templates/default/src/app.ts +18 -0
- package/templates/default/src/components/navigation-bar/navigation-bar.json +6 -0
- package/templates/default/src/components/navigation-bar/navigation-bar.scss +0 -0
- package/templates/default/src/components/navigation-bar/navigation-bar.ts +3 -0
- package/templates/default/src/components/navigation-bar/navigation-bar.wxml +0 -0
- package/templates/default/src/pages/index/index.json +6 -0
- package/templates/default/src/pages/index/index.scss +0 -0
- package/templates/default/src/pages/index/index.ts +3 -0
- package/templates/default/src/pages/index/index.wxml +1 -0
- package/templates/default/src/pages/logs/logs.json +6 -0
- package/templates/default/src/pages/logs/logs.scss +0 -0
- package/templates/default/src/pages/logs/logs.ts +3 -0
- package/templates/default/src/pages/logs/logs.wxml +0 -0
- package/templates/default/src/sitemap.json +10 -0
- package/templates/default/src/theme.json +5 -0
- package/templates/default/src/utils/util.ts +0 -0
- package/templates/default/tailwind.config.ts +17 -0
- package/templates/default/tsconfig.json +46 -0
- package/templates/default/tsconfig.node.json +13 -0
- package/templates/default/vite-env.d.ts +1 -0
- package/templates/default/vite.config.ts +28 -0
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Config } from 'tailwindcss'
|
|
2
|
+
|
|
3
|
+
export default <Config>{
|
|
4
|
+
content: [
|
|
5
|
+
// 添加你需要提取的文件目录
|
|
6
|
+
'src/**/*.{wxml,js,ts}',
|
|
7
|
+
],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {},
|
|
10
|
+
},
|
|
11
|
+
plugins: [],
|
|
12
|
+
corePlugins: {
|
|
13
|
+
// 小程序不需要 preflight 和 container,因为这主要是给 h5 的,如果你要同时开发小程序和 h5 端,你应该使用环境变量来控制它
|
|
14
|
+
preflight: false,
|
|
15
|
+
container: false,
|
|
16
|
+
},
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"jsx": "preserve",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2020",
|
|
7
|
+
"DOM",
|
|
8
|
+
"DOM.Iterable"
|
|
9
|
+
],
|
|
10
|
+
"useDefineForClassFields": true,
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"paths": {
|
|
15
|
+
"@/*": [
|
|
16
|
+
"./*"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"types": [
|
|
21
|
+
"miniprogram-api-typings"
|
|
22
|
+
],
|
|
23
|
+
"allowImportingTsExtensions": true,
|
|
24
|
+
"allowJs": true,
|
|
25
|
+
"strict": true,
|
|
26
|
+
"noFallthroughCasesInSwitch": true,
|
|
27
|
+
"noUnusedLocals": true,
|
|
28
|
+
"noUnusedParameters": true,
|
|
29
|
+
"noEmit": true,
|
|
30
|
+
"isolatedModules": true,
|
|
31
|
+
"skipLibCheck": true
|
|
32
|
+
},
|
|
33
|
+
"references": [
|
|
34
|
+
{
|
|
35
|
+
"path": "./tsconfig.node.json"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"include": [
|
|
39
|
+
"src/**/*.ts",
|
|
40
|
+
"src/**/*.js"
|
|
41
|
+
],
|
|
42
|
+
"exclude": [
|
|
43
|
+
"node_modules",
|
|
44
|
+
"dist"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UnifiedViteWeappTailwindcssPlugin } from 'weapp-tailwindcss/vite'
|
|
2
|
+
import { defineConfig } from 'weapp-vite/config'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
weapp: {
|
|
6
|
+
srcRoot: 'src',
|
|
7
|
+
// pnpm g 生成的格式
|
|
8
|
+
// https://vite.icebreaker.top/guide/generate.html
|
|
9
|
+
generate: {
|
|
10
|
+
extensions: {
|
|
11
|
+
js: 'ts',
|
|
12
|
+
wxss: 'scss',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
css: {
|
|
17
|
+
preprocessorOptions: {
|
|
18
|
+
scss: {
|
|
19
|
+
silenceDeprecations: ['legacy-js-api'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
plugins: [
|
|
24
|
+
UnifiedViteWeappTailwindcssPlugin({
|
|
25
|
+
rem2rpx: true,
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
})
|