MLH-Fellowship / MLH-Fellowship/react-native-tutorial

Document CLI and tutorial workflow

Ouverte
#41 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@StuffByLiang y travaille déjà.

Depuis le 21/12/2020.

Langage dominant
JavaScript
Étoiles
6
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.