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.
This section is to help developers set up Siteit locally on their machines for development.
Make sure you have the following technologies installed on your machine:
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.
fork
the Siteit on Github.- Use
git clone
toclone
the forked repo to your local machine cd
into the cloned directory, and create a newbranch
for your changes.- Run
npm link
to run Siteit locally on your machine - Run
npm start
to start Siteit
This script builds the source code using babel
, and starts an instance of siteit
on your machine.
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
.
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.
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
.
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.
Siteit currently supports initial testing for functionality using the Jest framework.
To run tests using jest
, execute the following script
:
npm test
To report a bug file create a new issue. Please go through open issues to see if the bug still needs to be reported.
To suggest an enhancement create a new issue. Make sure to include why the enhancement you suggest could improve the codebase.