Document CLI and tutorial workflow

未关闭
#41 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@StuffByLiang 已经在做这个了。

开始于 2020年12月21日。

评估

这个 Issue 还没有评估数据。

描述

Goals

One of the main goals this fall was to build a scaffold/basic structure for a react native tutorial project, and to plan out how the end user would go from start to finish while navigating through each tutorial step.

Approach Summary

Our approach was to use git to manage the tutorial steps.

The user would clone the tutorial repository, which is the default react-native application shell and would immediately work on step one. Once finished, their code would be ran against a set of test suites created for that tutorial step, and upon passing, the set of tests for the next tutorial step would automatically be added to the project and the user would continue to work on the next task.

Implementation Details

When do we run the test suite against their code?
  • We use Git Hooks to run custom commands when certain important actions occur. Specifically, we will use git 'pre-commit' and 'post-commit' hooks. We use Husky to help us implement these.

    • pre-commit: this hook is run before the git commit runs through to 'inspect' the commit. You can run tests and if they fail, the git commit will also faill
    • post-commit: this hook is run when the git commit succeeds and is completed.
  • This is what how we use husky: the following code is located in the package.json folder.
    image

  • When the tutorial user thinks they have completed the tutorial step, they should perform a 'git commit'. we run npm test, and if that fails, then the commit message is rejected. If all tests pass, we run a post-commit hook that calls our cli and asks it to add the next set of tests to the current branch that the user is working on

Command Line Interface Implementation

Libraries used
  • in progress
主要语言
JavaScript
星标
6
派生
0
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MLH-Fellowship/react-native-tutorial 的其他 Issue

查看 MLH-Fellowship/react-native-tutorial 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。