-
Notifications
You must be signed in to change notification settings - Fork 34
Set up Guidelines
On GitHub, navigate to the PC-Prep-Kit Repository. In the top-right corner of the page, click Fork.
Now, navigate to the forked repository in your profile. In the top-right corner of the page, you will find a green button with the text "Clone or download". Click on it. Copy the link that appears in the popup.
Now, go to your terminal (if you are using a Linux platform) or git bash (if you are using a Windows platform) and execute this command
git clone URL
Replace URL with the copied url
or you can just,
Go to your terminal and execute this command
$ git clone https://github.com/YOUR_USERNAME/PC-Prep-Kit
Replace YOUR_USERNAME with your Github username.
Install all dependencies in package.json file. This can be done by navigating to the cloned PC-Prep-Kit directory in the command prompt/terminal/console and running the following command:
$ cd PC-Prep-Kit
$ npm install
Edit the settings.js
file inside the config folder with your custom API keys and database setup information.
Create a new tab in your terminal/command line and in there log in to your local MySQL account and follow the steps below:
CREATE DATABASE pcprepkit;
or if you are using a tool like phpMyAdmin to manage your database, you can setup it up there too.
Once the database is setup, run the following command from the project directory.
$ npm start
Then create a new terminal or command line tab and go to the project directory and run
$ ng build --watch
to setup the Angular developmental server.
After the build completes, you can navigate to http://localhost:3000/ in your browser to check out the application.
And, that's it, you are DONE. You have successfully setup the project.
The app will automatically reload if you change any of the source files.
Backend Testing uses mocha, supertest and should.js, these packages are installed automatically from the package.json file and will be available after all the packages are installed by running npm install
.
The test file is available in test/test.js.
To contribute to the backend testing for PC Prep Kit, you can search for APIs for which the test cases have not been written, or validity of current tests due to any API changes.
Frontend Testing uses Karma and Jasmine, these packages are installed automatically from the package.json file and will be available after all the packages are installed by running npm install
.
The test files are available in the src/tests/ folder.
Steps to run the tests:
Run ng test
to execute the unit tests via Karma.
To contribute to the frontend testing for PC Prep Kit, you can look for files for which the test cases have not been written, or fix test cases that fail.
Run ng lint
in your terminal to identify all linting errors with Angular files.
You can also run tslint PATH_TO_YOUR_typescript_FILE
to check for linting errors of individual files.
Run eslint *.js; eslint **/*.js
in your terminal to identify all linting errors with Node files.
You can also run eslint PATH_TO_YOUR_nodejs_FILE
to check for linting errors of individual files.
To get more help on the angular-cli use ng --help
or go check out the Angular-CLI README.
Run npm install --save PACKAGE_NAME
to install packages locally and add it to package.json file.
Or
Run npm install -g PACKAGE_NAME
to install packages globally and use it across all node projects.
Replace PACKAGE_NAME with the actual name of the package.
Still having trouble installing npm packages. You can learn more about it here.
Get help on Sequelize here.
Users can post their questions on the Slack Channel group pc-prep-kit or use the Mailing List .