{"id":13789288,"url":"https://github.com/MMF-FE/wepy-template","last_synced_at":"2025-05-12T05:32:10.402Z","repository":{"id":44979707,"uuid":"114625771","full_name":"MMF-FE/wepy-template","owner":"MMF-FE","description":"微信小程序 typescript 框架。(typescript, scss)","archived":false,"fork":false,"pushed_at":"2022-12-07T09:17:19.000Z","size":528,"stargazers_count":38,"open_issues_count":8,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-06T21:06:33.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MMF-FE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-18T10:09:06.000Z","updated_at":"2022-01-20T04:02:29.000Z","dependencies_parsed_at":"2023-01-24T15:31:00.905Z","dependency_job_id":null,"html_url":"https://github.com/MMF-FE/wepy-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fwepy-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fwepy-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fwepy-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fwepy-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MMF-FE","download_url":"https://codeload.github.com/MMF-FE/wepy-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253682546,"owners_count":21946960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T21:01:01.135Z","updated_at":"2025-05-12T05:32:10.377Z","avatar_url":"https://github.com/MMF-FE.png","language":"JavaScript","funding_links":[],"categories":["微信小程序WePY框架开发资源汇总 ![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)"],"sub_categories":["WePY相关工具"],"readme":"# wepy-template\n微信小程序模板框架。(目前支持和使用 `typescript` )\n\n### 介绍\n`wepy-template` 是由 [`wepy-cli`](https://github.com/Tencent/wepy) 生成后的项目结构，根据 `typescript，scss，wxml` 语言分离出相应文件且有针对性的小程序项目模板。\n\n~~由于 `wepy-cli` 原因，目前只能先把代码 `clone` 下来，然后在该项目进行 `git inti` 和 `yarn init` 操作，或使用 `yarn init-project` 命令。~~\nwepy-cli于1.7.0版本开始支持 `wepy init` 生成模板\n[初始化命令在下方](#初始化)\n\n### 特性\n\n* 默认使用 ES2015+特性 ~~（暂不支持 typescript ，[主要原因 bug(1)](#bug)）~~\n* 默认使用 Typescript\n* 默认使用 Scss\n* 新增 cli 工具，生成 pages 或 components 文件\n\n### 安装使用\n##### 安装\n```console\nyarn 或 npm i -d\n```\n#### 初始化\n```console\nyarn init-project\n\n使用 wepy-cli命令：\nnpm install -g wepy-cli\nwepy init MMF-FE/wepy-template my-project\ncd my-project\nyarn\nyarn dev\n```\n#### 运行\n```console\nyarn dev\n```\n#### cli 工具\n```console\nyarn cli -- -h\n\n如（旧版 yarn）：\npages : yarn cli -- a index\ncomponents : yarn cli -- a index -t c\n新版：\npages：yarn cli add index\ncomponents: yarn cli add index -t component\n```\n#### 构建\n```console\nyarn build 或 yarn web\n```\n## 目录结构\n```\n- src\n |- api  # 接口\n   |- modules # 按模块对接接口\n |- common # 公共\n |- static # 静态资源\n   |- assets # 图片资源\n |- components # 组件\n |- mixin\n |- style # app 全局 sass 样式\n |- utils # 工具函数\n```\n\n#### [注意](https://tencent.github.io/wepy/document.html#/?id=%e9%87%8d%e8%a6%81%e6%8f%90%e9%86%92)\n- 使用微信开发者工具 --\u003e 添加项目，项目目录请选择 `dist` 目录\n- 关闭微信开发者工具 `ES6` 转 `ES5` 功能\n- 关闭上传代码时样式自动补全\n- 关闭代码压缩上传\n\n#### bug\n1. ~~`script` 标签中添加 `lang=typescript` 属性，编译后的代码缺少执行函数。~~\n2. `wepy.config.js` 中设置 `wepyExt=.vue` 会出现部分编译出错。\n3. 在 js 中添加 config ，能编译出相应的 json 文件，但该段代码还会保留在编译后的 js 文件（代码冗余）。\n4. web 还不是支持很好。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMMF-FE%2Fwepy-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMMF-FE%2Fwepy-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMMF-FE%2Fwepy-template/lists"}