@weapp-core/init 2.0.9 → 2.0.10

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 CHANGED
@@ -41,7 +41,7 @@ __export(index_exports, {
41
41
  });
42
42
  module.exports = __toCommonJS(index_exports);
43
43
 
44
- // ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.13.3_jiti@2.5.1_postcss@8.5.6_tsx@4.20.3_typescript@5.9.2_yaml@2.8.0/node_modules/tsup/assets/cjs_shims.js
44
+ // ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.13.3_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
45
45
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
46
46
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
47
47
 
@@ -471,7 +471,7 @@ var posix = /* @__PURE__ */ mix(":");
471
471
  var win32 = /* @__PURE__ */ mix(";");
472
472
 
473
473
  // ../../packages/weapp-vite/package.json
474
- var version = "5.0.14";
474
+ var version = "5.0.17";
475
475
 
476
476
  // src/context.ts
477
477
  function createContext() {
package/dist/index.js CHANGED
@@ -424,7 +424,7 @@ var posix = /* @__PURE__ */ mix(":");
424
424
  var win32 = /* @__PURE__ */ mix(";");
425
425
 
426
426
  // ../../packages/weapp-vite/package.json
427
- var version = "5.0.14";
427
+ var version = "5.0.17";
428
428
 
429
429
  // src/context.ts
430
430
  function createContext() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-core/init",
3
3
  "type": "module",
4
- "version": "2.0.9",
4
+ "version": "2.0.10",
5
5
  "description": "@weapp-core/init",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "templates"
39
39
  ],
40
40
  "dependencies": {
41
- "fs-extra": "^11.3.0",
42
- "@weapp-core/shared": "^2.0.1",
43
- "@weapp-core/logger": "^2.0.0"
41
+ "fs-extra": "^11.3.1",
42
+ "@weapp-core/logger": "^2.0.0",
43
+ "@weapp-core/shared": "^2.0.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/semver": "^7.7.0",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "miniprogram-api-typings": "^4.1.0",
27
- "sass": "^1.89.2",
27
+ "sass": "^1.90.0",
28
28
  "typescript": "^5.9.2",
29
29
  "weapp-vite": "workspace:*"
30
30
  }
@@ -4,5 +4,5 @@
4
4
  "setting": {
5
5
  "compileHotReLoad": true
6
6
  },
7
- "libVersion": "development"
7
+ "libVersion": "3.9.0"
8
8
  }
@@ -1,3 +1,5 @@
1
1
  Page({
2
-
2
+ onClick() {
3
+ console.log('on click')
4
+ },
3
5
  })
@@ -1,4 +1,9 @@
1
1
  <view>
2
2
  <Navbar />
3
- <view>Hello World From Weapp-vite!</view>
3
+ <view style="display:flex;align-items:center;justify-content:center;">
4
+ <view>
5
+ <image style="width:200px;height:190px" src="/logo.png" />
6
+ <view bind:tap="onClick">Hello World From Weapp-vite!</view>
7
+ </view>
8
+ </view>
4
9
  </view>
@@ -1,34 +1,42 @@
1
1
  import { defineConfig } from 'weapp-vite/config'
2
2
 
3
- export default defineConfig({
4
- weapp: {
5
- srcRoot: 'src',
6
- // pnpm g 生成的格式
7
- // https://vite.icebreaker.top/guide/generate.html
8
- generate: {
9
- extensions: {
10
- js: 'ts',
11
- wxss: 'scss',
3
+ export default defineConfig(
4
+ ({ mode }) => {
5
+ console.log('[mode]:', mode)
6
+ return {
7
+ weapp: {
8
+ srcRoot: 'src',
9
+ // pnpm g 生成的格式
10
+ // https://vite.icebreaker.top/guide/generate.html
11
+ generate: {
12
+ extensions: {
13
+ js: 'ts',
14
+ wxss: 'scss',
15
+ },
16
+ dirs: {
17
+ component: 'src/components',
18
+ page: 'src/pages',
19
+ },
20
+ // 假如你想让默认生成的组件命名为 HelloWorld/index 而不是 HelloWorld/HelloWorld 可以下列选项
21
+ // filenames: {
22
+ // component: 'index',
23
+ // page: 'index',
24
+ // },
25
+ },
12
26
  },
13
- dirs: {
14
- component: 'src/components',
15
- page: 'src/pages',
27
+ css: {
28
+ preprocessorOptions: {
29
+ scss: {
30
+ silenceDeprecations: ['legacy-js-api', 'import'],
31
+ },
32
+ },
16
33
  },
17
- // 假如你想让默认生成的组件命名为 HelloWorld/index 而不是 HelloWorld/HelloWorld 可以下列选项
18
- // filenames: {
19
- // component: 'index',
20
- // page: 'index',
21
- // },
22
- },
23
- },
24
- css: {
25
- preprocessorOptions: {
26
- scss: {
27
- silenceDeprecations: ['legacy-js-api', 'import'],
34
+ plugins: [
35
+ // 在这里注册 vite 插件
36
+ ],
37
+ build: {
38
+ sourcemap: true,
28
39
  },
29
- },
40
+ }
30
41
  },
31
- plugins: [
32
- // 在这里注册 vite 插件
33
- ],
34
- })
42
+ )
@@ -29,7 +29,7 @@
29
29
  "autoprefixer": "^10.4.21",
30
30
  "miniprogram-api-typings": "^4.1.0",
31
31
  "postcss": "^8.5.6",
32
- "sass": "^1.89.2",
32
+ "sass": "^1.90.0",
33
33
  "tailwindcss": "^3.4.17",
34
34
  "typescript": "^5.9.2",
35
35
  "weapp-tailwindcss": "^4.2.5",
@@ -32,7 +32,7 @@
32
32
  "autoprefixer": "^10.4.21",
33
33
  "miniprogram-api-typings": "^4.1.0",
34
34
  "postcss": "^8.5.6",
35
- "sass": "^1.89.2",
35
+ "sass": "^1.90.0",
36
36
  "tailwindcss": "^3.4.17",
37
37
  "typescript": "^5.9.2",
38
38
  "weapp-tailwindcss": "^4.2.5",
@@ -32,7 +32,7 @@
32
32
  "autoprefixer": "^10.4.21",
33
33
  "miniprogram-api-typings": "^4.1.0",
34
34
  "postcss": "^8.5.6",
35
- "sass": "^1.89.2",
35
+ "sass": "^1.90.0",
36
36
  "tailwindcss": "^3.4.17",
37
37
  "typescript": "^5.9.2",
38
38
  "weapp-tailwindcss": "^4.2.5",
Binary file
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "https://vite.icebreaker.top/page.json",
3
- "usingComponents": {
4
- "Navbar": "/components/Navbar/Navbar"
5
- },
6
- "navigationBarTitleText": "初始模板"
7
- }