Repository: Tencent/wepy Branch: master Commit: 253aa5bba394 Files: 482 Total size: 762.9 KB Directory structure: gitextract_swnsaggd/ ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github/ │ ├── ISSUE_TEMPLATE.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── stale.yml │ └── workflows/ │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .npmignore ├── .nycrc ├── .prettierrc.yml ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CONTRIBUTING_COMMIT.md ├── LICENSE ├── README.md ├── README_EN.md ├── lerna.json ├── package.json ├── packages/ │ ├── babel-plugin-import-regenerator/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── README_EN.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── mutiple-async/ │ │ │ │ ├── actual.js │ │ │ │ └── expected.js │ │ │ └── normal/ │ │ │ ├── actual.js │ │ │ └── expected.js │ │ └── index.test.js │ ├── cli/ │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── bin/ │ │ │ ├── cli/ │ │ │ │ ├── ask.js │ │ │ │ ├── check-version.js │ │ │ │ ├── download.js │ │ │ │ ├── eval.js │ │ │ │ ├── filter.js │ │ │ │ ├── generate.js │ │ │ │ ├── git-user.js │ │ │ │ ├── local-path.js │ │ │ │ ├── logger.js │ │ │ │ └── options.js │ │ │ ├── wepy-build.js │ │ │ ├── wepy-init.js │ │ │ ├── wepy-list.js │ │ │ ├── wepy-new.js │ │ │ ├── wepy-upgrade.js │ │ │ └── wepy.js │ │ ├── core/ │ │ │ ├── ast/ │ │ │ │ ├── index.js │ │ │ │ ├── paramsDetect.js │ │ │ │ ├── parseClass.js │ │ │ │ ├── toAST.js │ │ │ │ ├── walker.js │ │ │ │ └── wxml.js │ │ │ ├── compile.js │ │ │ ├── fileDep.js │ │ │ ├── hook.js │ │ │ ├── init/ │ │ │ │ ├── compiler.js │ │ │ │ ├── parser.js │ │ │ │ └── plugin.js │ │ │ ├── loader.js │ │ │ ├── moduleSet.js │ │ │ ├── parseOptions.js │ │ │ ├── plugins/ │ │ │ │ ├── build/ │ │ │ │ │ ├── app.js │ │ │ │ │ ├── assets.js │ │ │ │ │ ├── components.js │ │ │ │ │ ├── pages.js │ │ │ │ │ └── vendor.js │ │ │ │ ├── compiler/ │ │ │ │ │ ├── before.js │ │ │ │ │ ├── common.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── wxss.js │ │ │ │ ├── helper/ │ │ │ │ │ ├── errorHandler.js │ │ │ │ │ ├── generateCodeFrame.js │ │ │ │ │ ├── sfcCustomBlock.js │ │ │ │ │ └── supportSrc.js │ │ │ │ ├── parser/ │ │ │ │ │ ├── component.js │ │ │ │ │ ├── config.js │ │ │ │ │ ├── file.js │ │ │ │ │ ├── script.js │ │ │ │ │ ├── style.js │ │ │ │ │ ├── template.js │ │ │ │ │ ├── wpy.js │ │ │ │ │ └── wxs.js │ │ │ │ ├── scriptDepFix.js │ │ │ │ ├── scriptInjection.js │ │ │ │ └── template/ │ │ │ │ ├── attrs/ │ │ │ │ │ ├── bindClass.js │ │ │ │ │ ├── bindStyle.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── ref.js │ │ │ │ │ └── src.js │ │ │ │ ├── directives/ │ │ │ │ │ ├── bind.js │ │ │ │ │ ├── condition.js │ │ │ │ │ ├── for.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── model.js │ │ │ │ │ ├── other.js │ │ │ │ │ └── v-on.js │ │ │ │ ├── parse.js │ │ │ │ └── util/ │ │ │ │ └── check.js │ │ │ ├── tag.js │ │ │ └── util/ │ │ │ ├── ast.js │ │ │ ├── const.js │ │ │ ├── error.js │ │ │ ├── exprParser.js │ │ │ ├── hash.js │ │ │ ├── logger.js │ │ │ ├── tools.js │ │ │ └── xmllint.js │ │ ├── index.js │ │ ├── package.json │ │ ├── test/ │ │ │ ├── config.js │ │ │ └── core/ │ │ │ ├── fileDep.test.js │ │ │ ├── fixtures/ │ │ │ │ └── template/ │ │ │ │ ├── assert/ │ │ │ │ │ ├── attrWithoutValue.wxml │ │ │ │ │ ├── bindClass.wxml │ │ │ │ │ ├── bindStyle.wxml │ │ │ │ │ ├── joinStyle.wxml │ │ │ │ │ ├── ref.wxml │ │ │ │ │ ├── reference.wxml │ │ │ │ │ ├── v-for.wxml │ │ │ │ │ ├── v-if.wxml │ │ │ │ │ ├── v-on/ │ │ │ │ │ │ ├── 0-0.tap.js │ │ │ │ │ │ ├── 0-1.tap.js │ │ │ │ │ │ ├── 0-10.tap.js │ │ │ │ │ │ ├── 0-11.tap.js │ │ │ │ │ │ ├── 0-12.tap.js │ │ │ │ │ │ ├── 0-13.tap.js │ │ │ │ │ │ ├── 0-14.tap.js │ │ │ │ │ │ ├── 0-15.tap.js │ │ │ │ │ │ ├── 0-2.tap.js │ │ │ │ │ │ ├── 0-3.tap.js │ │ │ │ │ │ ├── 0-4.tap.js │ │ │ │ │ │ ├── 0-5.tap.js │ │ │ │ │ │ ├── 0-6.tap.js │ │ │ │ │ │ ├── 0-7.tap.js │ │ │ │ │ │ ├── 0-8.tap.js │ │ │ │ │ │ └── 0-9.click-right.js │ │ │ │ │ ├── v-on.wxml │ │ │ │ │ ├── v-on.wxs.wxml │ │ │ │ │ └── v-show.wxml │ │ │ │ └── original/ │ │ │ │ ├── attrWithoutValue.html │ │ │ │ ├── bindClass.html │ │ │ │ ├── bindStyle.html │ │ │ │ ├── joinStyle.html │ │ │ │ ├── ref.html │ │ │ │ ├── reference.html │ │ │ │ ├── v-for.html │ │ │ │ ├── v-if.html │ │ │ │ ├── v-on.html │ │ │ │ ├── v-on.wxs.html │ │ │ │ └── v-show.html │ │ │ ├── hook.test.js │ │ │ ├── init/ │ │ │ │ └── plugin.test.js │ │ │ ├── parseOption.test.js │ │ │ ├── plugins/ │ │ │ │ ├── helper/ │ │ │ │ │ └── sfcCustomBlock.test.js │ │ │ │ └── template/ │ │ │ │ └── parse.test.js │ │ │ └── tag.test.js │ │ └── util/ │ │ └── logger.js │ ├── compiler-babel/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ └── app.js │ │ ├── helper/ │ │ │ ├── ast.js │ │ │ └── index.js │ │ └── index.test.js │ ├── compiler-less/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── createPlugin.js │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── css/ │ │ │ │ ├── alias.css │ │ │ │ ├── basic.css │ │ │ │ ├── extend.css │ │ │ │ ├── function.css │ │ │ │ ├── guards.css │ │ │ │ ├── import.css │ │ │ │ ├── lazy.css │ │ │ │ ├── list-each.css │ │ │ │ ├── list.css │ │ │ │ ├── selector.css │ │ │ │ └── uri.css │ │ │ └── less/ │ │ │ ├── alias.less │ │ │ ├── basic.less │ │ │ ├── extend.less │ │ │ ├── fail-missing-file.less │ │ │ ├── fail-uri-alias.less │ │ │ ├── guards.less │ │ │ ├── import.less │ │ │ ├── lazy.less │ │ │ ├── list-each.less │ │ │ ├── list.less │ │ │ ├── selector.less │ │ │ ├── uri.less │ │ │ └── vars/ │ │ │ ├── colors.less │ │ │ └── modules.less │ │ ├── helpers/ │ │ │ ├── lessc.js │ │ │ └── specs.js │ │ └── index.test.js │ ├── compiler-postcss/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── css/ │ │ │ │ ├── basic.css │ │ │ │ └── map.css │ │ │ └── postcss/ │ │ │ ├── basic.postcss │ │ │ └── map.postcss │ │ ├── helpers/ │ │ │ ├── postcssc.js │ │ │ └── specs.js │ │ └── index.test.js │ ├── compiler-sass/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── importsToResolve.js │ │ ├── index.js │ │ ├── package.json │ │ ├── resolveImporter.js │ │ ├── src/ │ │ │ └── index.js │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── css/ │ │ │ │ ├── alias.scss.css │ │ │ │ ├── basic.sass.css │ │ │ │ ├── basic.scss.css │ │ │ │ ├── import.sass.css │ │ │ │ └── import.scss.css │ │ │ └── sass/ │ │ │ ├── alias.scss │ │ │ ├── basic.sass │ │ │ ├── basic.scss │ │ │ ├── import.sass │ │ │ ├── import.scss │ │ │ └── vars/ │ │ │ └── colors.scss │ │ ├── helpers/ │ │ │ ├── generate.js │ │ │ └── specs.js │ │ └── index.test.js │ ├── compiler-stylus/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── createPlugin.js │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── css/ │ │ │ │ ├── alias.css │ │ │ │ ├── basic.css │ │ │ │ ├── extend.css │ │ │ │ ├── function.css │ │ │ │ ├── guards.css │ │ │ │ ├── import.css │ │ │ │ ├── list-each.css │ │ │ │ ├── list.css │ │ │ │ ├── selector.css │ │ │ │ └── uri.css │ │ │ └── stylus/ │ │ │ ├── alias.styl │ │ │ ├── basic.styl │ │ │ ├── extend.styl │ │ │ ├── fail-missing-file.styl │ │ │ ├── fail-uri-alias.styl │ │ │ ├── guards.styl │ │ │ ├── import.styl │ │ │ ├── list-each.styl │ │ │ ├── list.styl │ │ │ ├── selector.styl │ │ │ ├── uri.styl │ │ │ └── vars/ │ │ │ ├── colors.styl │ │ │ └── modules.styl │ │ ├── helpers/ │ │ │ ├── specs.js │ │ │ └── stylus.js │ │ └── index.test.js │ ├── compiler-typescript/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── index.js │ │ └── package.json │ ├── core/ │ │ ├── .nycrc │ │ ├── CHANGELOG.md │ │ ├── ant/ │ │ │ ├── apis/ │ │ │ │ └── index.js │ │ │ ├── class/ │ │ │ │ ├── WepyComponent.js │ │ │ │ └── WepyPage.js │ │ │ ├── init/ │ │ │ │ ├── events.js │ │ │ │ ├── index.js │ │ │ │ ├── lifecycle.js │ │ │ │ ├── methods.js │ │ │ │ └── props.js │ │ │ ├── native/ │ │ │ │ ├── app.js │ │ │ │ ├── component.js │ │ │ │ ├── index.js │ │ │ │ └── page.js │ │ │ └── wepy.js │ │ ├── dist/ │ │ │ ├── wepy.ant.js │ │ │ └── wepy.js │ │ ├── index.ant.js │ │ ├── index.js │ │ ├── package.json │ │ ├── shared/ │ │ │ ├── constants.js │ │ │ ├── env.js │ │ │ ├── extend.js │ │ │ ├── index.js │ │ │ └── util.js │ │ ├── src/ │ │ │ ├── bar.js │ │ │ ├── foo.js │ │ │ └── index.js │ │ ├── test/ │ │ │ ├── .istanbul.yml │ │ │ ├── bar.spec.js │ │ │ ├── foo.spec.js │ │ │ ├── index.test.js │ │ │ ├── mock/ │ │ │ │ ├── api/ │ │ │ │ │ └── createSelectorQuery.js │ │ │ │ └── wxapi.js │ │ │ └── weapp/ │ │ │ ├── class/ │ │ │ │ └── Dirty.js │ │ │ ├── dispatcher/ │ │ │ │ └── index.test.js │ │ │ ├── helper/ │ │ │ │ ├── index.js │ │ │ │ └── libs/ │ │ │ │ ├── App.js │ │ │ │ ├── Component.js │ │ │ │ └── Page.js │ │ │ ├── init/ │ │ │ │ ├── data.js │ │ │ │ └── lifecycle.test.js │ │ │ ├── observer/ │ │ │ │ ├── index.test.js │ │ │ │ └── observerPath.test.js │ │ │ └── util/ │ │ │ ├── debug.test.js │ │ │ ├── error.test.js │ │ │ ├── index.test.js │ │ │ ├── model.test.js │ │ │ └── next-tick.test.js │ │ ├── types/ │ │ │ ├── index.d.ts │ │ │ ├── options.d.ts │ │ │ ├── plugin.d.ts │ │ │ ├── test/ │ │ │ │ ├── tsconfig.json │ │ │ │ ├── wepy.app.test.ts │ │ │ │ ├── wepy.component.test.ts │ │ │ │ ├── wepy.page.test.ts │ │ │ │ └── wepy.test.ts │ │ │ ├── tsconfig.json │ │ │ ├── typings.json │ │ │ ├── wepy.d.ts │ │ │ └── wx/ │ │ │ ├── index.d.ts │ │ │ ├── lib.wx.api.d.ts │ │ │ ├── lib.wx.app.d.ts │ │ │ ├── lib.wx.behavior.d.ts │ │ │ ├── lib.wx.cloud.d.ts │ │ │ ├── lib.wx.component.d.ts │ │ │ └── lib.wx.page.d.ts │ │ └── weapp/ │ │ ├── apis/ │ │ │ ├── index.js │ │ │ ├── mixin.js │ │ │ └── use.js │ │ ├── class/ │ │ │ ├── Base.js │ │ │ ├── Dirty.js │ │ │ ├── Event.js │ │ │ ├── WepyApp.js │ │ │ ├── WepyComponent.js │ │ │ ├── WepyConstructor.js │ │ │ └── WepyPage.js │ │ ├── config.js │ │ ├── dispatcher/ │ │ │ └── index.js │ │ ├── global.js │ │ ├── init/ │ │ │ ├── computed.js │ │ │ ├── data.js │ │ │ ├── hooks.js │ │ │ ├── index.js │ │ │ ├── lifecycle.js │ │ │ ├── methods.js │ │ │ ├── mixins.js │ │ │ ├── props.js │ │ │ ├── relations.js │ │ │ ├── render.js │ │ │ └── watch.js │ │ ├── native/ │ │ │ ├── app.js │ │ │ ├── component.js │ │ │ ├── index.js │ │ │ └── page.js │ │ ├── observer/ │ │ │ ├── array.js │ │ │ ├── dep.js │ │ │ ├── index.js │ │ │ ├── observerPath.js │ │ │ ├── scheduler.js │ │ │ ├── traverse.js │ │ │ └── watcher.js │ │ ├── util/ │ │ │ ├── config.js │ │ │ ├── debug.js │ │ │ ├── error.js │ │ │ ├── index.js │ │ │ ├── model.js │ │ │ └── next-tick.js │ │ └── wepy.js │ ├── plugin-define/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── README_EN.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── fixtures/ │ │ │ ├── expected/ │ │ │ │ └── app.js │ │ │ ├── src/ │ │ │ │ └── app.wpy │ │ │ ├── weapp/ │ │ │ │ └── .gitignore │ │ │ └── wepy.config.js │ │ ├── index.integration.js │ │ └── index.test.js │ ├── plugin-eslint/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ └── index.test.js │ ├── plugin-uglifyjs/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ └── index.test.js │ ├── redux/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── README_EN.md │ │ ├── dist/ │ │ │ └── index.js │ │ ├── helper.js │ │ ├── index.js │ │ ├── install.js │ │ └── package.json │ ├── router/ │ │ ├── README.md │ │ ├── core/ │ │ │ ├── config.js │ │ │ ├── createRouter.js │ │ │ ├── guard/ │ │ │ │ ├── createComponentGuard.js │ │ │ │ ├── createRouterGuard.js │ │ │ │ ├── globalGuard.js │ │ │ │ ├── guardManager.js │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── routeManager.js │ │ │ ├── routerApi.js │ │ │ └── utils/ │ │ │ ├── getRealPageInfo.js │ │ │ ├── queue.js │ │ │ └── urlParse.js │ │ ├── doc/ │ │ │ ├── config.md │ │ │ ├── guard.md │ │ │ ├── instance.md │ │ │ ├── router.md │ │ │ └── usage.md │ │ ├── index.js │ │ ├── install.js │ │ └── package.json │ ├── use-intercept/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── README_EN.md │ │ ├── dist/ │ │ │ └── index.js │ │ ├── index.js │ │ ├── install.js │ │ ├── package.json │ │ └── test/ │ │ └── index.test.js │ ├── use-promisify/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── README_EN.md │ │ ├── dist/ │ │ │ └── index.js │ │ ├── index.js │ │ ├── install.js │ │ ├── package.json │ │ └── test/ │ │ └── index.test.js │ └── x/ │ ├── CHANGELOG.md │ ├── README.md │ ├── README_EN.md │ ├── dist/ │ │ └── index.js │ ├── index.js │ └── package.json ├── scripts/ │ ├── bootstrap.sh │ ├── build.js │ ├── build.sh │ ├── ci-release.js │ ├── clean.js │ ├── config.js │ ├── install_dev.sh │ ├── npm-ci-release.js │ ├── npm-tags.js │ ├── npm_publish/ │ │ ├── index.js │ │ └── lib/ │ │ ├── auto.js │ │ ├── check_repo_clean.js │ │ ├── interact.js │ │ └── log.js │ ├── release.js │ ├── test-build.sh │ └── unittest.js ├── test/ │ ├── build-cases/ │ │ ├── empty.sh │ │ └── standard.sh │ ├── build.sh │ ├── scripts/ │ │ └── ci-release.test.js │ └── unit.js └── verpub.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .eslintignore ================================================ /lib coverage/ packages/*/node_modules packages/*/lib packages/*/dist packages/*/test/fixtures packages/*/coverage packages/wepy-cli/templates packages/cli/test/core/fixtures gulpfile.js ================================================ FILE: .eslintrc ================================================ { "parser": "babel-eslint", "env": { "es6": true, "node": true, "mocha": true }, "rules": { "strict": [0], "eqeqeq": 2, "quotes": [2, "single", {"allowTemplateLiterals": true}], "no-underscore-dangle": 0, "eol-last": 0, "camelcase": 0, "no-loop-func": 0, "no-trailing-spaces": 0, "consistent-return": 0, "new-cap": 0, "no-shadow": 0, //"semi": 0, "no-process-exit": 0, "no-empty": 0, "yoda": 0, "no-new-func": 0 } } ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ 提交ISSUE前请确保已认真阅读以下内容 *Please read the following information carefully before you open an issue.* 在提交issue之前必须确认以下问题: *Please make sure you understand the following points:* * 必须是一个bug或者功能新增。 * *It must be a bug or a feature request* * 必须是WePY相关问题,原生小程序问题去[开发者论坛](https://developers.weixin.qq.com/)。 * *It must be a WePY issue.* * 已经在issue中搜索过,并且没有找到相似的issue或者解决方案。 * *I searched issue already but I didn't find any relevant issues or solutions.* * 完善下面模板中的信息 * *Please fill out the following template* 阅读完后请在提交的issue中删除以上内容,包括分割线 DELETE THE INFORMATION ABOVE(INCLUDE THE SEPARATION LINE) BEFORE YOU OPEN AN ISSUE ------------------------ ## Description [问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚] [Description of the issue] ## Environment * Platform: [开发者工具/iOS/Andriod/Web] * Platform version: [对应工具或者iOS或者Andriod的版本号] * Wechat version: [微信版本号] * wepy-cli version: [wepy-cli -v] * wepy version: [在package.json里] * other version: [如果是插件问题,请列出问题插件的版本号] ## Reproduce [如何重现问题] [How to reproduce the issue] ### Observed Results [实际表现] [Observed Results] ### Expected Results [期望表现] [Expected Results] ## Relevant Code / Logs ``` // TODO(you): code or logs here to reproduce the problem  // 可以使用小程序代码片段功能,方便其它人帮助你定位代码问题  // 详情可参考这里:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html  ``` ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ##### Checklist - [ ] `npm run test` passes - [ ] tests and/or benchmarks are included - [ ] cases or donate is changed or added - [ ] documentation is changed or added ================================================ FILE: .github/stale.yml ================================================ # Number of days of inactivity before an issue becomes stale daysUntilStale: 3600 # Number of days of inactivity before a stale issue is closed daysUntilClose: 1700 # Issues with these labels will never be considered stale exemptLabels: - pinned - security # Label to use when marking an issue as stale staleLabel: Inactive # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. 因为这个 Issue 最近没有任何有效回复,所以被自动标记为了`stale`。 如果在未来7天依旧没有任何激活操作,那么该 Issue 将会被自动关闭。 感谢您的提问。 # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false ================================================ FILE: .github/workflows/ci.yml ================================================ name: WePY CI Build on: [push, pull_request] jobs: build: runs-on: ubuntu-18.04 strategy: matrix: node-version: [10.x] steps: - name: Install expect run: | sudo apt -qy update && sudo apt install -y expect - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run bootstrap - run: npm run test - run: npm run bootstrap:prod - run: npm run test:build - name: Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} release: if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'release:') name: Release runs-on: ubuntu-18.04 needs: [build] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 registry-url: https://registry.npmjs.org/ - run: git reset --hard - run: | git config --global user.email "gcaufy@gmail.com" git config --global user.name "WePY CI" - run: npm install - run: npm run bootstrap - run: git status - run: git checkout . - name: NPM release env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: node ./scripts/ci-release.js - run: git status - run: git log ================================================ FILE: .github/workflows/release.yml ================================================ # This is a basic workflow to help you get started with Actions name: Release # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: push: tags: - '**' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: '10.19' - run: npm install - run: npm run bootstrap - run: npm run test - name: Set Tag Variable id: vars run: echo ::set-output name=tag::${GITHUB_REF:10} - name: Check Tag env: RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: | echo $GITHUB_REF echo $RELEASE_VERSION echo ${{ steps.vars.outputs.tag }} - name: Build dist run: npm run build - name: NPM release env: TAG_NAME: ${{ steps.vars.outputs.tag}} NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} run: | echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc node ./scripts/npm-ci-release.js "$TAG_NAME" node ./scripts/npm-tags.js "$TAG_NAME" next ================================================ FILE: .gitignore ================================================ node_modules/ sftp-config.json diff log npm-debug.log demo/ .nyc_output/ .vscode coverage lerna-debug.log /packages/*/lib .DS_Store .idea /yarn.lock ================================================ FILE: .npmignore ================================================ node_modules/ coverage/ demo/ test/ ISSUE_TEMPLATE.md appveyor.yml README_zh-CN.md *.map src/ coverage ================================================ FILE: .nycrc ================================================ { "reporter": ["lcov", "text-summary"] } ================================================ FILE: .prettierrc.yml ================================================ # 一行最多 120 字符 printWidth: 120 # 使用 2 个空格缩进 tabWidth: 2 # 不使用缩进符,而使用空格 useTabs: false # 行尾不需要分号 semi: true # 使用单引号 singleQuote: true # 对象的 key 仅在必要时用引号 quoteProps: as-needed # jsx 不使用单引号,而使用双引号 jsxSingleQuote: false # 末尾不需要逗号 trailingComma: none # 大括号内的首尾需要空格 bracketSpacing: true # jsx 标签的反尖括号需要换行 jsxBracketSameLine: false # 箭头函数,只有一个参数的时候,不需要括号 arrowParens: avoid # 每个文件格式化的范围是文件的全部内容 rangeStart: 0 # 不需要写文件开头的 @prettier requirePragma: false # 不需要自动在文件开头插入 @prettier insertPragma: false # 使用默认的折行标准 proseWrap: preserve # 根据显示样式决定 html 要不要折行 htmlWhitespaceSensitivity: css # 换行符使用 lf endOfLine: lf # 后缀文件名特有规则 overrides: - files: '*.{wxss,less}' options: parser: less - files: '*.json,.*rc' options: parser: json - files: '*.{wxml,html}' options: parser: html htmlWhitespaceSensitivity: strict # 避免text标签换行 printWidth: 999 - files: '*.wxs' options: parser: babel ================================================ FILE: .travis.yml ================================================ language: node_js node_js: - '10' matrix: include: - os: linux - os: osx sudo: false before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then sudo apt-get -qq update ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which expect) ]] ; then sudo apt-get install -y expect ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then stty cols 80 ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" && ! $(which expect) ]] ; then brew install expect ; fi install: - 'npm install' - 'npm run bootstrap' script: - 'npm run test' - 'npm run bootstrap:prod' - 'npm run test:build' after_script: 'npm install coveralls && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage' ================================================ FILE: CHANGELOG.md ================================================ # Change Log ## 2.1.0 (2020-07-04) (beta) #### :rocket: New Feature * `core` * [#2634](https://github.com/Tencent/wepy/pull/2634) feat: added routed lifecycle ([@Gcaufy](https://github.com/Gcaufy)) * `babel-plugin-import-regenerator`, `cli`, `compiler-babel`, `compiler-less`, `compiler-postcss`, `compiler-sass`, `compiler-stylus`, `compiler-typescript`, `core`, `plugin-define`, `plugin-eslint`, `plugin-uglifyjs`, `redux`, `use-intercept`, `use-promisify`, `x` * [#2620](https://github.com/Tencent/wepy/pull/2620) feat: added ci npm release support ([@Gcaufy](https://github.com/Gcaufy)) #### :bug: Bug Fix * `core` * [#2633](https://github.com/Tencent/wepy/pull/2633) fix(core): 修复了 type 必填的问题 ([@Gcaufy](https://github.com/Gcaufy)) #### Committers: 5 - Damon Chen ([@chenyu445](https://github.com/chenyu445)) - Deep ([@deepfunc](https://github.com/deepfunc)) - Gcaufy ([@Gcaufy](https://github.com/Gcaufy)) - Sail ([@dlhandsome](https://github.com/dlhandsome)) - 这也太那个了吧 ([@dev-itsheng](https://github.com/dev-itsheng)) ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing 我们提倡您通过提 issue 和 pull request 方式来促进 WePY 的发展。 ## Acknowledgements 非常感谢以下几位贡献者对于 WePY 的做出的贡献: - dlhandsome [awsomeduan@gmail.com](mailto:awsomeduan@gmail.com) - dolymood [dolymood@gmail.com](mailto:dolymood@gmail.com) - baisheng [baisheng@gmail.com](mailto:baisheng@gmail.com) - deepfunc [xiekai0601@gmail.com](mailto:xiekai0601@gmail.com) - nishino-tsukasa [nishinotsukasavirgo@gmail.com](mailto:nishinotsukasavirgo@gmail.com) 其中特别致谢 dlhandsome 提交的38个 commits, 对 WePY 做出了1,350增加和362处删减(截止02/28/18日)。 WePY 持续招募贡献者,即使是在 issue 中回答问题,或者做一些简单的 bugfix ,也会给 WePY 带来很大的帮助。 WePY 已开发近一年,在此感谢所有开发者对于 WePY 的喜欢和支持,希望你能够成为 WePY 的核心贡献者,加入 WePY ,共同打造一个更棒的小程序开发框架!🍾🎉 ​ ## Issue 提交 #### 对于贡献者 在提 issue 前请确保满足一下条件: - 必须是一个 bug 或者功能新增。 - 必须是 WePY 相关问题,原生小程序问题去[开发者论坛](https://developers.weixin.qq.com/)。 - 已经在 issue 中搜索过,并且没有找到相似的 issue 或者解决方案。 - 完善下面模板中的信息 如果已经满足以上条件,我们提供了 issue 的标准模版,请按照模板填写。 ​ ## Pull request 我们除了希望听到您的反馈和建议外,我们也希望您接受代码形式的直接帮助,对我们的 GitHub 发出 pull request 请求。 以下是具体步骤: #### Fork仓库 点击 `Fork` 按钮,将需要参与的项目仓库 fork 到自己的 Github 中。 #### Clone 已 fork 项目 在自己的 github 中,找到 fork 下来的项目,git clone 到本地。 ```bash $ git clone git@github.com:/wepy.git ``` #### 添加 WePY 仓库 将 fork 源仓库连接到本地仓库: ```bash $ git remote add # 例如: $ git remote add wepy git@github.com:Tencent/wepy.git ``` #### 保持与 WePY 仓库的同步 更新上游仓库: ```bash $ git pull --rebase # 等同于以下两条命令 $ git fetch $ git rebase / ``` #### commit 信息提交 commit 信息请遵循[commit消息约定](./CONTRIBUTING_COMMIT.md),以便可以自动生成 `CHANGELOG` 。具体格式请参考 commit 文档规范。 #### 开发调试代码 ```bash # Build code $ npm run build # Watch $ npm run watch # Run test cases $ npm run test # Useage $ wepy build # Global wepy you installed by npm $ wepy-dev build # Local wepy you compiled by your local repository $ wepy-debug build # Debug local wepy using node --inspect ``` ================================================ FILE: CONTRIBUTING_COMMIT.md ================================================ # Commit规范 在对项目作出更改后,我们需要生成 commit 来记录自己的更改。以下是参照 Angular 对 commit 格式的规范: ## (1) 格式 提交信息包括三个部分:`Header`,`Body` 和 `Footer`。 ```