@hyext/builder-revues 1.5.9 → 1.5.10-alpha.2

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 (46) hide show
  1. package/dist/index.js +43 -2
  2. package/package.json +6 -5
  3. package/static/.DS_Store +0 -0
  4. package/static/projects/.DS_Store +0 -0
  5. package/static/projects/empty/.eslintrc.js +31 -0
  6. package/static/projects/empty/app.js +2 -0
  7. package/static/projects/empty/app.json +11 -0
  8. package/static/projects/empty/app.wxss +10 -0
  9. package/static/projects/empty/components/navigation-bar/navigation-bar.js +105 -0
  10. package/static/projects/empty/components/navigation-bar/navigation-bar.json +5 -0
  11. package/static/projects/empty/components/navigation-bar/navigation-bar.wxml +64 -0
  12. package/static/projects/empty/components/navigation-bar/navigation-bar.wxss +96 -0
  13. package/static/projects/empty/pages/index/index.js +2 -0
  14. package/static/projects/empty/pages/index/index.json +5 -0
  15. package/static/projects/empty/pages/index/index.wxml +7 -0
  16. package/static/projects/empty/pages/index/index.wxss +10 -0
  17. package/static/projects/empty/project.config.json +25 -0
  18. package/static/projects/empty/sitemap.json +7 -0
  19. package/static/projects/ts/.DS_Store +0 -0
  20. package/static/projects/ts/.eslintrc.js +31 -0
  21. package/static/projects/ts/app.json +11 -0
  22. package/static/projects/ts/app.ts +8 -0
  23. package/static/projects/ts/app.wxss +10 -0
  24. package/static/projects/ts/components/navigation-bar/navigation-bar.js +105 -0
  25. package/static/projects/ts/components/navigation-bar/navigation-bar.json +5 -0
  26. package/static/projects/ts/components/navigation-bar/navigation-bar.wxml +64 -0
  27. package/static/projects/ts/components/navigation-bar/navigation-bar.wxss +96 -0
  28. package/static/projects/ts/pages/index/index.json +5 -0
  29. package/static/projects/ts/pages/index/index.ts +2 -0
  30. package/static/projects/ts/pages/index/index.wxml +7 -0
  31. package/static/projects/ts/pages/index/index.wxss +10 -0
  32. package/static/projects/ts/project.config.json +27 -0
  33. package/static/projects/ts/sitemap.json +7 -0
  34. package/static/projects/ts/tsconfig.json +26 -0
  35. package/static/projects/ts/typings/wechat-miniprogram/LICENSE +21 -0
  36. package/static/projects/ts/typings/wechat-miniprogram/README.md +15 -0
  37. package/static/projects/ts/typings/wechat-miniprogram/index.d.ts +143 -0
  38. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.api.d.ts +22112 -0
  39. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.app.d.ts +249 -0
  40. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.behavior.d.ts +47 -0
  41. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.cloud.d.ts +903 -0
  42. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.component.d.ts +613 -0
  43. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.event.d.ts +1413 -0
  44. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.page.d.ts +246 -0
  45. package/static/projects/ts/typings/wechat-miniprogram/package.json +63 -0
  46. package/static/projects/ts/util.ts +3 -0
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @revues/builder-revues
3
- * (c) 2024-2024 Alex
3
+ * (c) 2024-2025 Alex
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -23,6 +23,7 @@ var preload = require('@hyext/preload');
23
23
  var liveServer = require('live-server');
24
24
  var archiver = require('archiver');
25
25
  var R = require('ramda');
26
+ var inquirer = require('inquirer');
26
27
 
27
28
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
28
29
 
@@ -37,6 +38,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
37
38
  var liveServer__default = /*#__PURE__*/_interopDefaultLegacy(liveServer);
38
39
  var archiver__default = /*#__PURE__*/_interopDefaultLegacy(archiver);
39
40
  var R__default = /*#__PURE__*/_interopDefaultLegacy(R);
41
+ var inquirer__default = /*#__PURE__*/_interopDefaultLegacy(inquirer);
40
42
 
41
43
  /*! *****************************************************************************
42
44
  Copyright (c) Microsoft Corporation.
@@ -743,7 +745,7 @@ function genEntrys(props) {
743
745
  });
744
746
  }
745
747
 
746
- const libVersion = "1.4.4" ;
748
+ const libVersion = "1.4.5-alpha.1" ;
747
749
  const libCdn = '//a.msstatic.com/huya/hd/h5/static-source/revue/lib';
748
750
 
749
751
  function getLibVersion(builderConfig) {
@@ -1278,6 +1280,39 @@ function formatPluginZipName(zipPath, releasePath, projectConfig) {
1278
1280
  return zipPath;
1279
1281
  }
1280
1282
 
1283
+ const TemplateDir = path__default["default"].join(staticPath, 'projects');
1284
+ class ProjectTemplate {
1285
+ constructor(props) {
1286
+ this.props = props;
1287
+ }
1288
+ create() {
1289
+ return __awaiter(this, void 0, void 0, function* () {
1290
+ let { template, projectPath } = this.props;
1291
+ if (template == null) {
1292
+ const result = yield inquirer__default["default"].prompt({
1293
+ type: 'list',
1294
+ name: 'choice',
1295
+ message: '请选择项目模版:',
1296
+ choices: [
1297
+ 'empty',
1298
+ 'ts'
1299
+ ]
1300
+ });
1301
+ // @ts-ignore
1302
+ template = result.choice;
1303
+ if (template == null) {
1304
+ logger.log('未知异常');
1305
+ process.exit(1);
1306
+ }
1307
+ }
1308
+ logger.log(`starting init template '${template}'.`);
1309
+ const tempPath = path__default["default"].join(TemplateDir, template);
1310
+ yield fs__default["default"].copy(tempPath, projectPath, { overwrite: true });
1311
+ logger.success('template init finished.');
1312
+ });
1313
+ }
1314
+ }
1315
+
1281
1316
  function getTempProjectDir(projecName) {
1282
1317
  return path__default["default"].join(projectCacheDir, projecName);
1283
1318
  }
@@ -1407,6 +1442,12 @@ class RevueBuilder {
1407
1442
  packNpm(opts) {
1408
1443
  return packNpm(opts);
1409
1444
  }
1445
+ create(opts) {
1446
+ return __awaiter(this, void 0, void 0, function* () {
1447
+ const projectTemp = new ProjectTemplate(opts);
1448
+ yield projectTemp.create();
1449
+ });
1450
+ }
1410
1451
  config() { }
1411
1452
  providedProjectConfig() { }
1412
1453
  clearCache() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/builder-revues",
3
- "version": "1.5.9",
3
+ "version": "1.5.10-alpha.2",
4
4
  "description": "> TODO: description",
5
5
  "author": "loler",
6
6
  "homepage": "",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@hyext/preload": "^1.1.3",
28
- "@revues/cocos-web-adapter": "1.5.9",
29
- "@revues/code-compiler": "1.5.9",
30
- "@revues/web-sdk-core": "1.5.9",
28
+ "@revues/cocos-web-adapter": "1.5.10-alpha.2",
29
+ "@revues/code-compiler": "1.5.10-alpha.2",
30
+ "@revues/web-sdk-core": "1.5.10-alpha.2",
31
31
  "archiver": "^7.0.1",
32
32
  "axios": "^1.7.3",
33
33
  "chalk": "^2.4.2",
@@ -36,6 +36,7 @@
36
36
  "fs-extra": "8.1.0",
37
37
  "glob": "^10.3.10",
38
38
  "handlebars": "^4.7.8",
39
+ "inquirer": "5.2.0",
39
40
  "live-server": "^1.2.2",
40
41
  "ramda": "^0.29.1",
41
42
  "tapable": "^2.2.1",
@@ -47,5 +48,5 @@
47
48
  "@types/ramda": "^0.29.11",
48
49
  "terser": "^5.31.0"
49
50
  },
50
- "gitHead": "afdb1e3e0c04d36ce274e305c0137be375ebb860"
51
+ "gitHead": "718beb0248ea46f66865ab570462f7f7a23bf85f"
51
52
  }
package/static/.DS_Store CHANGED
Binary file
Binary file
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Eslint config file
3
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
4
+ * Install the Eslint extension before using this feature.
5
+ */
6
+ module.exports = {
7
+ env: {
8
+ es6: true,
9
+ browser: true,
10
+ node: true,
11
+ },
12
+ ecmaFeatures: {
13
+ modules: true,
14
+ },
15
+ parserOptions: {
16
+ ecmaVersion: 2018,
17
+ sourceType: 'module',
18
+ },
19
+ globals: {
20
+ wx: true,
21
+ App: true,
22
+ Page: true,
23
+ getCurrentPages: true,
24
+ getApp: true,
25
+ Component: true,
26
+ requirePlugin: true,
27
+ requireMiniProgram: true,
28
+ },
29
+ // extends: 'eslint:recommended',
30
+ rules: {},
31
+ }
@@ -0,0 +1,2 @@
1
+ // app.js
2
+ App({})
@@ -0,0 +1,11 @@
1
+ {
2
+ "pages": [
3
+ "pages/index/index"
4
+ ],
5
+ "window": {
6
+ "navigationBarTextStyle": "black",
7
+ "navigationStyle": "custom"
8
+ },
9
+ "style": "v2",
10
+ "sitemapLocation": "sitemap.json"
11
+ }
@@ -0,0 +1,10 @@
1
+ /**app.wxss**/
2
+ .container {
3
+ height: 100%;
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ padding: 200rpx 0;
9
+ box-sizing: border-box;
10
+ }
@@ -0,0 +1,105 @@
1
+ Component({
2
+ options: {
3
+ multipleSlots: true // 在组件定义时的选项中启用多slot支持
4
+ },
5
+ /**
6
+ * 组件的属性列表
7
+ */
8
+ properties: {
9
+ extClass: {
10
+ type: String,
11
+ value: ''
12
+ },
13
+ title: {
14
+ type: String,
15
+ value: ''
16
+ },
17
+ background: {
18
+ type: String,
19
+ value: ''
20
+ },
21
+ color: {
22
+ type: String,
23
+ value: ''
24
+ },
25
+ back: {
26
+ type: Boolean,
27
+ value: true
28
+ },
29
+ loading: {
30
+ type: Boolean,
31
+ value: false
32
+ },
33
+ homeButton: {
34
+ type: Boolean,
35
+ value: false,
36
+ },
37
+ animated: {
38
+ // 显示隐藏的时候opacity动画效果
39
+ type: Boolean,
40
+ value: true
41
+ },
42
+ show: {
43
+ // 显示隐藏导航,隐藏的时候navigation-bar的高度占位还在
44
+ type: Boolean,
45
+ value: true,
46
+ observer: '_showChange'
47
+ },
48
+ // back为true的时候,返回的页面深度
49
+ delta: {
50
+ type: Number,
51
+ value: 1
52
+ },
53
+ },
54
+ /**
55
+ * 组件的初始数据
56
+ */
57
+ data: {
58
+ displayStyle: ''
59
+ },
60
+ lifetimes: {
61
+ attached() {
62
+ const rect = wx.getMenuButtonBoundingClientRect()
63
+ wx.getSystemInfo({
64
+ success: (res) => {
65
+ const isAndroid = res.platform === 'android'
66
+ const isDevtools = res.platform === 'devtools'
67
+ this.setData({
68
+ ios: !isAndroid,
69
+ innerPaddingRight: `padding-right: ${res.windowWidth - rect.left}px`,
70
+ leftWidth: `width: ${res.windowWidth - rect.left }px`,
71
+ safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${res.safeArea.top}px); padding-top: ${res.safeArea.top}px` : ``
72
+ })
73
+ }
74
+ })
75
+ },
76
+ },
77
+ /**
78
+ * 组件的方法列表
79
+ */
80
+ methods: {
81
+ _showChange(show) {
82
+ const animated = this.data.animated
83
+ let displayStyle = ''
84
+ if (animated) {
85
+ displayStyle = `opacity: ${
86
+ show ? '1' : '0'
87
+ };transition:opacity 0.5s;`
88
+ } else {
89
+ displayStyle = `display: ${show ? '' : 'none'}`
90
+ }
91
+ this.setData({
92
+ displayStyle
93
+ })
94
+ },
95
+ back() {
96
+ const data = this.data
97
+ if (data.delta) {
98
+ wx.navigateBack({
99
+ delta: data.delta
100
+ })
101
+ }
102
+ this.triggerEvent('back', { delta: data.delta }, {})
103
+ }
104
+ },
105
+ })
@@ -0,0 +1,5 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "apply-shared",
4
+ "usingComponents": {}
5
+ }
@@ -0,0 +1,64 @@
1
+ <view class="weui-navigation-bar {{extClass}}">
2
+ <view class="weui-navigation-bar__inner {{ios ? 'ios' : 'android'}}" style="color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}}; {{safeAreaTop}};">
3
+
4
+ <!-- 左侧按钮 -->
5
+ <view class='weui-navigation-bar__left' style="{{leftWidth}};">
6
+ <block wx:if="{{back || homeButton}}">
7
+ <!-- 返回上一页 -->
8
+ <block wx:if="{{back}}">
9
+ <view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_goback">
10
+ <view
11
+ bindtap="back"
12
+ class="weui-navigation-bar__btn_goback_wrapper"
13
+ hover-class="weui-active"
14
+ hover-stay-time="100"
15
+ aria-role="button"
16
+ aria-label="返回"
17
+ >
18
+ <view class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
19
+ </view>
20
+ </view>
21
+ </block>
22
+ <!-- 返回首页 -->
23
+ <block wx:if="{{homeButton}}">
24
+ <view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_home">
25
+ <view
26
+ bindtap="home"
27
+ class="weui-navigation-bar__btn_home_wrapper"
28
+ hover-class="weui-active"
29
+ aria-role="button"
30
+ aria-label="首页"
31
+ >
32
+ <view class="weui-navigation-bar__button weui-navigation-bar__btn_home"></view>
33
+ </view>
34
+ </view>
35
+ </block>
36
+ </block>
37
+ <block wx:else>
38
+ <slot name="left"></slot>
39
+ </block>
40
+ </view>
41
+
42
+ <!-- 标题 -->
43
+ <view class='weui-navigation-bar__center'>
44
+ <view wx:if="{{loading}}" class="weui-navigation-bar__loading" aria-role="alert">
45
+ <view
46
+ class="weui-loading"
47
+ aria-role="img"
48
+ aria-label="加载中"
49
+ ></view>
50
+ </view>
51
+ <block wx:if="{{title}}">
52
+ <text>{{title}}</text>
53
+ </block>
54
+ <block wx:else>
55
+ <slot name="center"></slot>
56
+ </block>
57
+ </view>
58
+
59
+ <!-- 右侧留空 -->
60
+ <view class='weui-navigation-bar__right'>
61
+ <slot name="right"></slot>
62
+ </view>
63
+ </view>
64
+ </view>
@@ -0,0 +1,96 @@
1
+ .weui-navigation-bar {
2
+ --weui-FG-0:rgba(0,0,0,.9);
3
+ --height: 44px;
4
+ --left: 16px;
5
+ }
6
+ .weui-navigation-bar .android {
7
+ --height: 48px;
8
+ }
9
+
10
+ .weui-navigation-bar {
11
+ overflow: hidden;
12
+ color: var(--weui-FG-0);
13
+ flex: none;
14
+ }
15
+
16
+ .weui-navigation-bar__inner {
17
+ position: relative;
18
+ top: 0;
19
+ left: 0;
20
+ height: calc(var(--height) + env(safe-area-inset-top));
21
+ display: flex;
22
+ flex-direction: row;
23
+ align-items: center;
24
+ justify-content: center;
25
+ padding-top: env(safe-area-inset-top);
26
+ width: 100%;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .weui-navigation-bar__left {
31
+ position: relative;
32
+ padding-left: var(--left);
33
+ display: flex;
34
+ flex-direction: row;
35
+ align-items: flex-start;
36
+ height: 100%;
37
+ box-sizing: border-box;
38
+ }
39
+
40
+ .weui-navigation-bar__btn_goback_wrapper {
41
+ padding: 11px 18px 11px 16px;
42
+ margin: -11px -18px -11px -16px;
43
+ }
44
+
45
+ .weui-navigation-bar__btn_goback_wrapper.weui-active {
46
+ opacity: 0.5;
47
+ }
48
+
49
+ .weui-navigation-bar__btn_goback {
50
+ font-size: 12px;
51
+ width: 12px;
52
+ height: 24px;
53
+ -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
54
+ mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
55
+ -webkit-mask-size: cover;
56
+ mask-size: cover;
57
+ background-color: var(--weui-FG-0);
58
+ }
59
+
60
+ .weui-navigation-bar__center {
61
+ font-size: 17px;
62
+ text-align: center;
63
+ position: relative;
64
+ display: flex;
65
+ flex-direction: row;
66
+ align-items: center;
67
+ justify-content: center;
68
+ font-weight: bold;
69
+ flex: 1;
70
+ height: 100%;
71
+ }
72
+
73
+ .weui-navigation-bar__loading {
74
+ margin-right: 4px;
75
+ align-items: center;
76
+ }
77
+
78
+ .weui-loading {
79
+ font-size: 16px;
80
+ width: 16px;
81
+ height: 16px;
82
+ display: block;
83
+ background: transparent url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A") no-repeat;
84
+ background-size: 100%;
85
+ margin-left: 0;
86
+ animation: loading linear infinite 1s;
87
+ }
88
+
89
+ @keyframes loading {
90
+ from {
91
+ transform: rotate(0);
92
+ }
93
+ to {
94
+ transform: rotate(360deg);
95
+ }
96
+ }
@@ -0,0 +1,2 @@
1
+ // index.js
2
+ Page({})
@@ -0,0 +1,5 @@
1
+ {
2
+ "usingComponents": {
3
+ "navigation-bar": "/components/navigation-bar/navigation-bar"
4
+ }
5
+ }
@@ -0,0 +1,7 @@
1
+ <!--index.wxml-->
2
+ <navigation-bar title="Weixin" back="{{false}}" color="black" background="#FFF"></navigation-bar>
3
+ <scroll-view class="scrollarea" scroll-y type="list">
4
+ <view class="container">
5
+ Weixin
6
+ </view>
7
+ </scroll-view>
@@ -0,0 +1,10 @@
1
+ /**index.wxss**/
2
+ page {
3
+ height: 100vh;
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+ .scrollarea {
8
+ flex: 1;
9
+ overflow-y: hidden;
10
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "appid": "touris",
3
+ "compileType": "miniprogram",
4
+ "packOptions": {
5
+ "ignore": [],
6
+ "include": []
7
+ },
8
+ "builder": {
9
+ "name": "@hyext/builder-revues",
10
+ "config": {
11
+ "https": true,
12
+ "port": 18080,
13
+ "host": "localhost",
14
+ "supportExtTypes": [
15
+ "app_panel_h5",
16
+ "web_video_com",
17
+ "pc_panel"
18
+ ]
19
+ }
20
+ },
21
+ "setting": {
22
+
23
+ },
24
+ "condition": {}
25
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3
+ "rules": [{
4
+ "action": "allow",
5
+ "page": "*"
6
+ }]
7
+ }
Binary file
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Eslint config file
3
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
4
+ * Install the Eslint extension before using this feature.
5
+ */
6
+ module.exports = {
7
+ env: {
8
+ es6: true,
9
+ browser: true,
10
+ node: true,
11
+ },
12
+ ecmaFeatures: {
13
+ modules: true,
14
+ },
15
+ parserOptions: {
16
+ ecmaVersion: 2018,
17
+ sourceType: 'module',
18
+ },
19
+ globals: {
20
+ wx: true,
21
+ App: true,
22
+ Page: true,
23
+ getCurrentPages: true,
24
+ getApp: true,
25
+ Component: true,
26
+ requirePlugin: true,
27
+ requireMiniProgram: true,
28
+ },
29
+ // extends: 'eslint:recommended',
30
+ rules: {},
31
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "pages": [
3
+ "pages/index/index"
4
+ ],
5
+ "window": {
6
+ "navigationBarTextStyle": "black",
7
+ "navigationStyle": "custom"
8
+ },
9
+ "style": "v2",
10
+ "sitemapLocation": "sitemap.json"
11
+ }
@@ -0,0 +1,8 @@
1
+ import { sayHello } from "./util"
2
+
3
+ // app.js
4
+ App({
5
+ onLaunch() {
6
+ sayHello('mike')
7
+ }
8
+ })
@@ -0,0 +1,10 @@
1
+ /**app.wxss**/
2
+ .container {
3
+ height: 100%;
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ padding: 200rpx 0;
9
+ box-sizing: border-box;
10
+ }