-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update commitlint * chore: update commitlint * chore: remove image-source-loader * chore: update README * chore: update README * chore: update link * chore: update docs link * chore: update gitter link * chore: test case * chore: change entry
- Loading branch information
Showing
565 changed files
with
22,613 additions
and
18,746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
node_modules | ||
lib | ||
dist | ||
build | ||
coverage | ||
expected | ||
website | ||
gh-pages | ||
vendors | ||
eslint-config-rax | ||
examples | ||
# 忽略目录 | ||
examples/ | ||
scripts/ | ||
build/ | ||
test/ | ||
tests/ | ||
node_modules/ | ||
dist/ | ||
out/ | ||
|
||
# node 覆盖率文件 | ||
coverage/ | ||
|
||
# 忽略测试文件 | ||
__tests__/ | ||
/packages/*/lib/ | ||
|
||
# 忽略第三方包 | ||
/vendor/loader.js | ||
|
||
# 忽略文件 | ||
**/*-min.js | ||
**/*.min.js | ||
|
||
workspace/ | ||
__mocks__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
module.exports = { | ||
extends: ['rax'] | ||
}; | ||
const { getESLintConfig } = require('@iceworks/spec'); | ||
|
||
// https://www.npmjs.com/package/@iceworks/spec | ||
module.exports = getESLintConfig('rax-ts', { | ||
rules: { | ||
'no-useless-escape': 'off', | ||
'no-console': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@iceworks/best-practices/no-js-in-ts-project': 'off', | ||
'no-param-reassign': 'off', | ||
'max-len': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributing Guide | ||
|
||
Hi! I’m really excited that you are interested in contributing to Rax. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines. | ||
|
||
- [Setup Environment](#setup-environment) | ||
- [Run Examples](#run-examples) | ||
- [Publish Packages](publish-packages) | ||
- [Pull Request Guidelines](#pull-request-guidelines) | ||
- [Issue Reporting Guidelines](#issue-reporting-guidelines) | ||
- [Git Commit Specific](#git-commit-specific) | ||
|
||
## Setup Environment | ||
|
||
clone repo and initialize the setup environment: | ||
|
||
```bash | ||
# 1. clone and setup | ||
$ git clone git@github.com:raxjs/rax-app.git | ||
$ cd rax-app && npm run setup | ||
|
||
# 2. watch packages | ||
$ npm run watch | ||
``` | ||
|
||
## Run Examples | ||
|
||
We provide a lot of examples, you can run the examples: | ||
|
||
```bash | ||
$ cd examples/basic-spa | ||
$ npm link ../../packages/rax-app | ||
$ npm start | ||
``` | ||
|
||
## Publish Packages | ||
|
||
When you need to release, you can execute the command: | ||
|
||
```bash | ||
$ npm run publish | ||
# 1. ✔️ ✔️ ✔️ Checking the working tree status... | ||
# 2. 📦 📦 📦 Building packages... | ||
# 3. ⚡ ⚡ ⚡ Update package version automatically... | ||
# 4. 🚀 🚀 🚀 Start publishing... | ||
# 5. 🔖 🔖 🔖 Commit & Create tag'... | ||
# 6. 💡 💡 💡 Start syncing... | ||
``` | ||
|
||
* When you need to release a latest version, the tag will be created automatically, running `npm publish` will tag your package with the `latest` dist-tag. | ||
* To publish a package with the `beta` dist-tag, you can choose to release rc、beta、alpha versions, the tag will not be created. | ||
|
||
## Rollback Packages | ||
|
||
When a serious bug occurs in the production environment, you can backtrack the package version: | ||
|
||
```bash | ||
# rollback packages | ||
$ npm run rollback <version> | ||
|
||
# sync packages | ||
$ npm run sync | ||
``` | ||
|
||
|
||
## Pull Request Guidelines | ||
|
||
- Only code that's ready for release should be committed to the master branch. All development should be done in dedicated branches. | ||
- Checkout a **new** topic branch from master branch, and merge back against master branch. | ||
- Make sure `npm test` passes. | ||
- If adding new feature: | ||
- Add accompanying test case. | ||
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it. | ||
- If fixing a bug: | ||
- If you are resolving a special issue, add `(fix #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`. | ||
- Provide detailed description of the bug in the PR. Live demo preferred. | ||
- Add appropriate test coverage if applicable. | ||
|
||
## Issue Reporting Guidelines | ||
|
||
- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately. | ||
- For simple beginner questions, you can get quick answers from | ||
- For more complicated questions, you can use Google or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you! | ||
- Try to search for your issue, it may have already been answered or even fixed in the development branch. | ||
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed. | ||
- For bugs that involves build setups, you can create a reproduction repository with steps in the README. | ||
- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. | ||
|
||
## Git Commit Specific | ||
|
||
- Your commits message must follow our [git commit specific](./GIT_COMMIT_SPECIFIC.md). | ||
- We will check your commit message, if it does not conform to the specification, the commit will be automatically refused, make sure you have read the specification above. | ||
- You could use `git cz` with a CLI interface to replace `git commit` command, it will help you to build a proper commit-message, see [commitizen](https://github.com/commitizen/cz-cli). | ||
- It's OK to have multiple small commits as you work on your branch - we will let GitHub automatically squash it before merging. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# GIT COMMIT MESSAGE CHEAT SHEET | ||
|
||
**Proposed format of the commit message** | ||
|
||
``` | ||
<type>: <subject> | ||
<body> | ||
``` | ||
|
||
All lines are wrapped at 100 characters ! | ||
|
||
**Allowed `<type>`** | ||
|
||
- feat (A new feature) | ||
- fix (A bug fix) | ||
- docs (Documentation only changes) | ||
- style (Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)) | ||
- perf (A code change that improves performance) | ||
- refactor (A code change that neither fixes a bug nor adds a feature) | ||
- test (Adding missing tests or correcting existing tests) | ||
- build (Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)) | ||
- ci (Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)) | ||
- chore (Other changes that don't modify src or test files) | ||
- revert (Reverts a previous commit) | ||
- release (Relase version) | ||
|
||
|
||
**Breaking changes** | ||
|
||
All breaking changes have to be mentioned in message body, on separated line: | ||
|
||
_Breaks removed $browser.setUrl() method (use $browser.url(newUrl))_ | ||
_Breaks ng: repeat option is no longer supported on selects (use ng:options)_ | ||
|
||
**Message body** | ||
|
||
- uses the imperative, present tense: “change” not “changed” nor “changes” | ||
- includes motivation for the change and contrasts with previous behavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: 'Bug report' | ||
about: 'Report rax-app, components, documents and other issues' | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
## What is the current behavior? | ||
|
||
<!-- | ||
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. | ||
--> | ||
|
||
## What is the expected behavior?** | ||
|
||
## Any additional comments? | ||
|
||
- **rax-app Version**: | ||
- **build.json Configuration**: | ||
- **Node Version**: | ||
- **Platform**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: '反馈缺陷问题' | ||
about: '反馈框架 rax-app、文档等缺陷问题' | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
<!-- | ||
感谢您向我们反馈问题,为了高效的解决问题,我们期望您能按照以下步骤进行: | ||
--> | ||
|
||
<!-- | ||
在提交问题前,请先搜索一下以往的旧 issue,您遇到的问题可能已经有人提了,或者在最新版本中被修复。 | ||
--> | ||
|
||
## 发生了什么? | ||
|
||
<!-- 清晰的描述下遇到的问题,建议附上错误截图 --> | ||
|
||
## 复现步骤,错误日志以及相关配置 | ||
|
||
> 建议并上传到你的 GitHub 仓库,请使用 `yarn init rax <project-name>` 选择 Lite 模板,这样您的问题我们会更高优先级的进行解决。 | ||
<!-- 为节约大家的时间以及更快的解决您的问题,请尽可能的描述清楚复现步骤 --> | ||
<!-- 简洁清晰的重现步骤能够帮助我们更迅速地定位问题所在 --> | ||
<!-- 可以尝试不要锁版本,或者重新安装依赖 --> | ||
|
||
## 期望的结果是什么 | ||
|
||
<!-- 您期待的正确结果是什么 --> | ||
|
||
## 相关环境信息 | ||
|
||
- **rax-app 版本**: | ||
- **build.json 配置**: | ||
- **Node 版本**: | ||
- **操作系统**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Beta Publisher | ||
|
||
on: | ||
push: | ||
branches: | ||
- beta | ||
|
||
jobs: | ||
build-and-publish-beta: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: nelonoel/branch-name@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm run setup | ||
- run: npm run publish:beta | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | ||
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }} | ||
REGISTRY: https://registry.npmjs.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
name: ci | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-and-publish: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v2 | ||
- uses: nelonoel/branch-name@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm i | ||
- run: npm run ci | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run setup | ||
- run: npm run dependency:check | ||
- run: npm run lint | ||
- run: npm run test | ||
- run: npm run version:check | ||
- run: npm run coverage | ||
env: | ||
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | ||
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }} | ||
CI: true |
Oops, something went wrong.