Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 4.1 KB

CONTRIBUTING.md

File metadata and controls

104 lines (73 loc) · 4.1 KB

Contributing to Siteit

Thank you for showing interest in contributing to Siteit.

We encourage all sorts of contributions, whether your changes improve the source code or enhance the documentation. Please read Table of Contents to get started.


Table of Contents


Code Contribution

This section is to help developers set up Siteit locally on their machines for development.

Getting Started

Pre-requisites

Make sure you have the following technologies installed on your machine:

  • Node current LTS version.
  • npm current release.

An easy to way to test if you already have the above technologies installed is by running the following commands:

node -v
npm -v

If you have node and npm installed, the above commands will print the installed version information.

If you get an error message, please install the missing technology.

Note: We recommend installing the current LTS version of node for your operating system to test and develop Siteit without complications.

Getting Started

  • fork the Siteit on Github.
  • Use git clone to clone the forked repo to your local machine
  • cd into the cloned directory, and create a new branch for your changes.
  • Run npm link to run Siteit locally on your machine
  • Run npm start to start Siteit
About npm start

This script builds the source code using babel, and starts an instance of siteit on your machine.

Making Changes

Note:

  • Make all your changes in a new git branch. Learn more about creating branches here
  • Make changes only in the src folder

To run Siteit locally with changes you introduced to the source code, you need to run the following script:

npm run build

Running the above script will compile the code using babel and output in the build folder.

Modify the files in src folder, as files within the build folder are overwritten when the source code is compiled using babel.

Starting the Project

Assuming you ran the npm link previously as instructed, run npm start to start Siteit locally. Alternatively, you can start the project by running node ./build/index.js from the command line.

Statically Generated Content

If you ran the tool using options that accepts a source as an argument, the rendered HTML will can be found in the dist under root.

Formatting and Error Checking

Frequently check your code for formatting and other problems using the following commands:

npm run prettier:check Running the above script will run tests to check for formatting errors in the src folder, using prettier.

npm run lint Running the above script will run tests to check for problems in the code using ESLint.


To automatically apply the changes detected by using prettier and ESLint, use the following scripts:

npm run prettier:format
npm run lint:fix

Note: If you push changes without running checks for formatting and problems in code, the husky pre-commit hook will automatically apply the changes before pushing your changes remotely to GitHub.

Running Tests

Siteit currently supports initial testing for functionality using the Jest framework.

To run tests using jest, execute the following script:

npm test

Reporting Bugs

To report a bug file create a new issue. Please go through open issues to see if the bug still needs to be reported.

Suggesting Enhancements

To suggest an enhancement create a new issue. Make sure to include why the enhancement you suggest could improve the codebase.