This document describes how to set up your development environment to build and test this project.
It also explains the basic mechanics of using git
and `node``.
- Prerequisite Software
- Getting the Sources
- Installing NPM Modules
- Serving
- Building
- Running Tests Locally
- Formatting your Source Code
- Linting/verifying your Source Code
See the contribution guidelines if you'd like to contribute to this project.
Before you can build and test this project, you must install and configure the following products on your development machine:
-
Git and/or the GitHub app (for Mac and Windows); GitHub's Guide to Installing Git is a good source of information.
-
Node.js, (version specified in the engines field of
package.json
) which is used to run a development web server, run tests, and generate distributable files.
Fork and clone the repository:
- Login to your GitHub account or create one by following the instructions given here.
- Fork the repository.
- Clone your fork of the repository and define an
upstream
remote pointing back to the Angular repository that you forked in the first place.
# Clone your GitHub repository:
git clone [email protected]:<github username>/issue-forms-creator.git
# Go to the directory:
cd issue-forms-creator
# Add the main repository as an upstream remote to your repository:
git remote add upstream https://github.com/geromegrignon/issue-forms-creator.git
Next, install the JavaScript modules needed to build and test the project:
# Install project dependencies (package.json)
npm install
To run Issue Forms Creator locally:
ng serve
To build Issue Forms Creator run:
ng build
To run unit testing with Jest:
ng test
To run component testing with Cypress:
# headless version
npm run ct:riun
# GUI version
npm run ct:open
Angular uses prettier to format the source code. If the source code is not properly formatted, the CI will fail and the PR cannot be merged.
The project uses lint-staged to automatically format the source code.
You can check that your code is properly formatted and adheres to coding style by running:
ng lint