|
1 | 1 |
|
2 |
| -#### 中文文档出于时间关系尚未完善,欢迎 PR |
| 2 | +受 [@tyrchen](https://github.com/tyrchen) 老师的 [code is law](https://zhuanlan.zhihu.com/p/36913380), |
| 3 | +启发,本项目使用类 unix 环境下最基础的 `make` 作为构建工具, 遵循统一清晰的命名规范,以便在前后端各个子项目 |
| 4 | +间做到 `don't make me think` 的工作流程。 你可以在项目根目录执行 `make` 或 `make help` 查看帮助。 |
| 5 | + |
| 6 | +```text |
| 7 | + [valid launch commands] |
| 8 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
| 9 | + launch.mock : start server in mock(default) mode" |
| 10 | + | config locate in \"config/mock.exs\"" |
| 11 | + ....................................................." |
| 12 | + launch.dev : start phoenix server in development env" |
| 13 | + | config locate in \"config/dev.exs\"" |
| 14 | + ....................................................." |
| 15 | + launch.prod : start phoenix server in produnction env" |
| 16 | + | config locate in \"config/prod.exs\"" |
| 17 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
| 18 | +
|
| 19 | +
|
| 20 | + [valid generators] |
| 21 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 22 | + gen.migration : generate migration fils |
| 23 | + | e.p : gen.migration arg="add_name_to_users" |
| 24 | + | note : need to run "make migrate" later |
| 25 | + .................................................................................. |
| 26 | + gen.context : generate a new context |
| 27 | + | e.p: make gen.context Accounts Credential credentials |
| 28 | + email:string:unique user_id:references:users |
| 29 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 30 | +
|
| 31 | +
|
| 32 | + [valid commit commands] |
| 33 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 34 | + commit : commit changes follow convention |
| 35 | + | convention: AngularJS's commit message convention |
| 36 | + | link: https://github.com/commitizen/cz-cli |
| 37 | + | link: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines |
| 38 | + | require: npm install |
| 39 | + | require: npm -v > 5.2 to use npx |
| 40 | + | link: https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b |
| 41 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 42 | +
|
| 43 | +
|
| 44 | + [valid release commands] |
| 45 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 46 | + release : release version by automatic CHANGELOG generation |
| 47 | + | link: https://github.com/conventional-changelog/standard-version |
| 48 | + | more: |
| 49 | + | npm run release -- --prerelease |
| 50 | + | npm run release -- --prerelease alpha |
| 51 | + ................................................................................. |
| 52 | + release.master : release master branch |
| 53 | + ................................................................................. |
| 54 | + release.dev : release dev branch |
| 55 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 56 | +
|
| 57 | +
|
| 58 | + [valid deploy commands] |
| 59 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 60 | + deploy.dev : pack & push code to aliyun for dev |
| 61 | + | need manually restart docker container on aliyun |
| 62 | + ............................................................... |
| 63 | + deploy.prod : pack & push code to for produnction |
| 64 | + | need manually restart docker container on aliyun |
| 65 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 66 | +
|
| 67 | +
|
| 68 | + [valid console commands] |
| 69 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 70 | + console : run iex |
| 71 | + ................................... |
| 72 | + console.dev : run iex in dev env |
| 73 | + ................................... |
| 74 | + console.mock : run iex in mock env |
| 75 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 76 | +
|
| 77 | +
|
| 78 | + [valid test commands] |
| 79 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 80 | + test : run all the test then quit |
| 81 | + ..................................................... |
| 82 | + test.watch : run all the test in watch mode |
| 83 | + ..................................................... |
| 84 | + test.watch.wip : run @wip test in watch mode |
| 85 | + ..................................................... |
| 86 | + test.db_reset : reset test database |
| 87 | + | needed when add new migration |
| 88 | + ..................................................... |
| 89 | + test.report : show test coverage status web page |
| 90 | + ..................................................... |
| 91 | + test.report.text : show test coverage in terminal |
| 92 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 93 | +
|
| 94 | +
|
| 95 | + [valid dashboard commands] |
| 96 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 97 | + dashboard.apollo : graphql api status provide by apollo engine |
| 98 | + | https://engine.apollographql.com/account/gh.mydearxym/services |
| 99 | + ................................................................................. |
| 100 | + dashboard.aliyun : aliyun console |
| 101 | + | https://home.console.aliyun.com/new |
| 102 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 103 | +
|
| 104 | +
|
| 105 | + [valid ci commands] |
| 106 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 107 | + ci.build : browse travis status |
| 108 | + | https://travis-ci.org/coderplanets/coderplanets_server |
| 109 | + .......................................................................... |
| 110 | + ci.coverage : browse test coveralls status |
| 111 | + | https://coveralls.io/github/coderplanets/coderplanets_server |
| 112 | + .......................................................................... |
| 113 | + ci.codecov : browse test codecov status |
| 114 | + | https://codecov.io/gh/coderplanets/coderplanets_server |
| 115 | + .......................................................................... |
| 116 | + ci.doc : browse doc coverage status |
| 117 | + | https://inch-ci.org/github/coderplanets/coderplanets_server |
| 118 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 119 | +
|
| 120 | +
|
| 121 | + [valid github commands] |
| 122 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 123 | + github.code : browse source code in github |
| 124 | + | https://github.com/coderplanets/coderplanets_server |
| 125 | + .................................................................................... |
| 126 | + github.doc : browse repo docs in github |
| 127 | + | https://github.com/coderplanets/coderplanets_server/tree/dev/docs |
| 128 | + .................................................................................... |
| 129 | + github.pr : browse PRs in github |
| 130 | + | https://github.com/coderplanets/coderplanets_server/pulls |
| 131 | + .................................................................................... |
| 132 | + github.issue : browse issues in github |
| 133 | + | https://github.com/coderplanets/coderplanets_server/issues |
| 134 | + .................................................................................... |
| 135 | + github.issue.new : create issue in github |
| 136 | + | https://github.com/coderplanets/coderplanets_server/issues/new |
| 137 | + .................................................................................... |
| 138 | + github.app : github oauth status (need login) |
| 139 | + | https://github.com/settings/applications/689577 |
| 140 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 141 | +``` |
| 142 | + |
0 commit comments