@weapp-core/init 2.1.5 → 3.0.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.
Files changed (29) hide show
  1. package/dist/index.cjs +491 -304
  2. package/dist/index.d.cts +71 -41
  3. package/dist/index.d.ts +71 -41
  4. package/dist/index.js +488 -301
  5. package/package.json +1 -1
  6. package/templates/default/gitignore +34 -0
  7. package/templates/default/package.json +2 -2
  8. package/templates/{tdesign/src/components/Navbar/Navbar.json → default/src/components/HelloWorld/HelloWorld.json} +1 -2
  9. package/templates/default/src/components/HelloWorld/HelloWorld.ts +1 -0
  10. package/templates/default/src/components/HelloWorld/HelloWorld.wxml +4 -0
  11. package/templates/default/src/pages/index/index.json +7 -0
  12. package/templates/default/src/pages/index/index.wxml +1 -1
  13. package/templates/tailwindcss/gitignore +34 -0
  14. package/templates/tailwindcss/package.json +3 -3
  15. package/templates/tdesign/gitignore +34 -0
  16. package/templates/tdesign/package.json +3 -3
  17. package/templates/{default/src/components/Navbar/Navbar.json → tdesign/src/components/HelloWorld/HelloWorld.json} +0 -1
  18. package/templates/tdesign/src/components/HelloWorld/HelloWorld.ts +5 -0
  19. package/templates/tdesign/src/components/HelloWorld/HelloWorld.wxml +7 -0
  20. package/templates/tdesign/src/pages/index/index.json +1 -1
  21. package/templates/tdesign/src/pages/index/index.wxml +6 -10
  22. package/templates/vant/gitignore +34 -0
  23. package/templates/vant/package.json +3 -3
  24. package/templates/default/src/components/Navbar/Navbar.ts +0 -3
  25. package/templates/default/src/components/Navbar/Navbar.wxml +0 -1
  26. package/templates/tdesign/src/components/Navbar/Navbar.ts +0 -3
  27. package/templates/tdesign/src/components/Navbar/Navbar.wxml +0 -0
  28. /package/templates/default/src/components/{Navbar/Navbar.scss → HelloWorld/HelloWorld.scss} +0 -0
  29. /package/templates/tdesign/src/components/{Navbar/Navbar.scss → HelloWorld/HelloWorld.scss} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-core/init",
3
3
  "type": "module",
4
- "version": "2.1.5",
4
+ "version": "3.0.0",
5
5
  "description": "@weapp-core/init",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -0,0 +1,34 @@
1
+ # dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # testing
7
+ coverage
8
+
9
+ # next.js
10
+ .next/
11
+ out/
12
+ build
13
+
14
+ # misc
15
+ .DS_Store
16
+ *.pem
17
+
18
+ # debug
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+ .pnpm-debug.log*
23
+
24
+ # local env files
25
+ .env.local
26
+ .env.development.local
27
+ .env.test.local
28
+ .env.production.local
29
+
30
+ # turbo
31
+ .turbo
32
+
33
+ dist
34
+ vite.config.ts.timestamp-*.mjs
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "miniprogram-api-typings": "^4.1.0",
27
- "sass": "^1.93.0",
28
- "typescript": "^5.9.2",
27
+ "sass": "^1.93.2",
28
+ "typescript": "^5.9.3",
29
29
  "weapp-vite": "workspace:*"
30
30
  }
31
31
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "$schema": "https://vite.icebreaker.top/component.json",
3
3
  "component": true,
4
- // 组件需要设置成 "apply-shared" 才能使用 app.wxss 里的全局样式
5
4
  "styleIsolation": "apply-shared",
6
5
  "usingComponents": {}
7
- }
6
+ }
@@ -0,0 +1,4 @@
1
+ <view style="text-align: center;">
2
+ <view>hello weapp-vite!</view>
3
+ <view>from src/components/HelloWorld/HelloWorld</view>
4
+ </view>
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://vite.icebreaker.top/page.json",
3
+ "usingComponents": {
4
+ "HelloWorld": "/components/HelloWorld/HelloWorld"
5
+ },
6
+ "navigationBarTitleText": "初始模板"
7
+ }
@@ -1,9 +1,9 @@
1
1
  <view>
2
- <Navbar />
3
2
  <view style="display:flex;align-items:center;justify-content:center;">
4
3
  <view>
5
4
  <image style="width:200px;height:190px" src="/logo.png" />
6
5
  <view bind:tap="onClick">Hello World From Weapp-vite!</view>
7
6
  </view>
8
7
  </view>
8
+ <HelloWorld></HelloWorld>
9
9
  </view>
@@ -0,0 +1,34 @@
1
+ # dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # testing
7
+ coverage
8
+
9
+ # next.js
10
+ .next/
11
+ out/
12
+ build
13
+
14
+ # misc
15
+ .DS_Store
16
+ *.pem
17
+
18
+ # debug
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+ .pnpm-debug.log*
23
+
24
+ # local env files
25
+ .env.local
26
+ .env.development.local
27
+ .env.test.local
28
+ .env.production.local
29
+
30
+ # turbo
31
+ .turbo
32
+
33
+ dist
34
+ vite.config.ts.timestamp-*.mjs
@@ -29,10 +29,10 @@
29
29
  "autoprefixer": "^10.4.21",
30
30
  "miniprogram-api-typings": "^4.1.0",
31
31
  "postcss": "^8.5.6",
32
- "sass": "^1.93.0",
32
+ "sass": "^1.93.2",
33
33
  "tailwindcss": "^3.4.17",
34
- "typescript": "^5.9.2",
35
- "weapp-tailwindcss": "^4.3.2",
34
+ "typescript": "^5.9.3",
35
+ "weapp-tailwindcss": "^4.3.3",
36
36
  "weapp-vite": "workspace:*"
37
37
  }
38
38
  }
@@ -0,0 +1,34 @@
1
+ # dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # testing
7
+ coverage
8
+
9
+ # next.js
10
+ .next/
11
+ out/
12
+ build
13
+
14
+ # misc
15
+ .DS_Store
16
+ *.pem
17
+
18
+ # debug
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+ .pnpm-debug.log*
23
+
24
+ # local env files
25
+ .env.local
26
+ .env.development.local
27
+ .env.test.local
28
+ .env.production.local
29
+
30
+ # turbo
31
+ .turbo
32
+
33
+ dist
34
+ vite.config.ts.timestamp-*.mjs
@@ -32,10 +32,10 @@
32
32
  "autoprefixer": "^10.4.21",
33
33
  "miniprogram-api-typings": "^4.1.0",
34
34
  "postcss": "^8.5.6",
35
- "sass": "^1.93.0",
35
+ "sass": "^1.93.2",
36
36
  "tailwindcss": "^3.4.17",
37
- "typescript": "^5.9.2",
38
- "weapp-tailwindcss": "^4.3.2",
37
+ "typescript": "^5.9.3",
38
+ "weapp-tailwindcss": "^4.3.3",
39
39
  "weapp-vite": "workspace:*"
40
40
  }
41
41
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "$schema": "https://vite.icebreaker.top/component.json",
3
3
  "component": true,
4
- // 组件需要设置成 "apply-shared" 才能使用 app.wxss 里的全局样式
5
4
  "styleIsolation": "apply-shared",
6
5
  "usingComponents": {}
7
6
  }
@@ -0,0 +1,5 @@
1
+ Component({
2
+ options: {
3
+ virtualHost: true,
4
+ },
5
+ })
@@ -0,0 +1,7 @@
1
+ <view class="flex space-x-8">
2
+ <view class="w-24 h-24 bg-[url(https://vite.icebreaker.top/logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
3
+ <view class="w-32 h-24 bg-[url(https://vite.icebreaker.top/tw-logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
4
+ </view>
5
+ <view class="bg-gradient-to-r from-green-400 to-sky-400 bg-clip-text text-xl font-extrabold text-transparent underline">
6
+ weapp-vite & weapp-tailwindcss
7
+ </view>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://vite.icebreaker.top/page.json",
3
3
  "usingComponents": {
4
- "Navbar": "/components/Navbar/Navbar"
4
+ "HelloWorld": "/components/HelloWorld/HelloWorld"
5
5
  },
6
6
  "navigationBarTitleText": "初始模板"
7
7
  }
@@ -1,13 +1,10 @@
1
1
  <view class="min-h-screen {{ mode === 'light'?'bg-gray-100 text-slate-800':'bg-gray-900 text-slate-200' }} transition-colors duration-500">
2
2
  <view class="flex flex-col items-center pt-20 space-y-10">
3
- <view class="flex space-x-8">
4
- <view class="w-24 h-24 bg-[url(https://vite.icebreaker.top/logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
5
- <view class="w-32 h-24 bg-[url(https://vite.icebreaker.top/tw-logo.png)] bg-[length:100%_100%] bg-no-repeat"></view>
3
+ <HelloWorld></HelloWorld>
4
+ <view bind:tap="switchMode" class="flex items-center">
5
+ 当前模式 {{mode}} 切换模式
6
+ <view class="{{ mode === 'light' ? 'i-mdi-moon-waxing-crescent':'i-mdi-weather-sunny text-white' }} text-2xl"></view>
6
7
  </view>
7
- <view class="bg-gradient-to-r from-green-400 to-sky-400 bg-clip-text text-xl font-extrabold text-transparent underline">
8
- weapp-vite & weapp-tailwindcss
9
- </view>
10
- <view class="{{ mode === 'light' ? 'i-mdi-moon-waxing-crescent':'i-mdi-weather-sunny text-white' }} text-8xl" bind:tap="switchMode"></view>
11
8
  <view class="underline" mark:url="https://vite.icebreaker.top" bind:tap="copy">
12
9
  https://vite.icebreaker.top
13
10
  </view>
@@ -15,9 +12,8 @@
15
12
  https://tw.icebreaker.top
16
13
  </view>
17
14
  <view>
18
- <t-button theme="primary" ghost @tap="handleAction">TDesign Button</t-button>
15
+ <t-button theme="primary" ghost bind:tap="handleAction">TDesign Button</t-button>
19
16
  </view>
20
17
  </view>
21
- <t-action-sheet id="t-action-sheet" @selected="handleSelected" />
18
+ <t-action-sheet id="t-action-sheet" bind:selected="handleSelected" />
22
19
  </view>
23
-
@@ -0,0 +1,34 @@
1
+ # dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # testing
7
+ coverage
8
+
9
+ # next.js
10
+ .next/
11
+ out/
12
+ build
13
+
14
+ # misc
15
+ .DS_Store
16
+ *.pem
17
+
18
+ # debug
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+ .pnpm-debug.log*
23
+
24
+ # local env files
25
+ .env.local
26
+ .env.development.local
27
+ .env.test.local
28
+ .env.production.local
29
+
30
+ # turbo
31
+ .turbo
32
+
33
+ dist
34
+ vite.config.ts.timestamp-*.mjs
@@ -32,10 +32,10 @@
32
32
  "autoprefixer": "^10.4.21",
33
33
  "miniprogram-api-typings": "^4.1.0",
34
34
  "postcss": "^8.5.6",
35
- "sass": "^1.93.0",
35
+ "sass": "^1.93.2",
36
36
  "tailwindcss": "^3.4.17",
37
- "typescript": "^5.9.2",
38
- "weapp-tailwindcss": "^4.3.2",
37
+ "typescript": "^5.9.3",
38
+ "weapp-tailwindcss": "^4.3.3",
39
39
  "weapp-vite": "workspace:*"
40
40
  }
41
41
  }
@@ -1,3 +0,0 @@
1
- Component({
2
-
3
- })
@@ -1 +0,0 @@
1
- <view>Navbar</view>
@@ -1,3 +0,0 @@
1
- Component({
2
-
3
- })