Changes

Jump to: navigation, search

DPS909 & OSD600 Winter 2017 - Lab 2

2,918 bytes added, 11:15, 13 January 2017
Created page with "=Contributing to an Open Source Project on Github= In this lab you will contribute a fix to an open source project on Github. Successfully completing this lab will require y..."
=Contributing to an Open Source Project on Github=

In this lab you will contribute a fix to an open source project on Github. Successfully completing this lab will require you to have first worked through, and understood, this week's git walkthroughs. If you have not already done so, please setup git and Github as described in the following:
* [[DPS909 & OSD600 Winter 2017 - Git Walkthrough | Git Walkthrough - Basics]]
* [[DPS909 & OSD600 Winter 2017 - Git Walkthrough 2 | Git Walkthrough #2 - Working Remote]]

==1. Install node.js==

We will be contributing to projects that use [https://nodejs.org/en/ node.js], its package manager [https://en.wikipedia.org/wiki/Npm_(software) npm], and the [https://www.npmjs.com/ npmjs module registry]. In order to complete this lab, you will need to install node.js, which you can [https://nodejs.org/en/download/ download here].

==2. Understanding package.json==

Node uses a special file named <code>package.json</code> to specify metadata about a module. You can read a complete description of <code>package.json</code> at https://docs.npmjs.com/files/package.json.

Let's look at some examples from popular node.js open source projects:
* https://github.com/foreverjs/forever/blob/master/package.json
* https://github.com/expressjs/express/blob/master/package.json
* https://github.com/request/request/blob/master/package.json
* https://github.com/tj/commander.js/blob/master/package.json

These <code>package.json</code> files have common elements, such as:
* a [https://docs.npmjs.com/files/package.json#name name]
* a [https://docs.npmjs.com/files/package.json#description-1 description]
* a [https://docs.npmjs.com/files/package.json#version version]
* a [https://docs.npmjs.com/files/package.json#license license]

There are also some optional fields you can include, for example:
* a list of [https://docs.npmjs.com/files/package.json#keywords keywords]
* a [https://docs.npmjs.com/files/package.json#homepage homepage] URL
* [https://docs.npmjs.com/files/package.json#repository repository] info
* [https://docs.npmjs.com/files/package.json#bugs bugs] info

The metadata in <code>package.json</code> is used by the command-line tool <code>npm</code> as well as by the online registry https://www.npmjs.com/. Providing good data for these tools makes it easier for developers to find and use node modules.

...

==Submission==

You will have completed your lab when you have done the following:
* Create a Pull Request to a project fixing some problem or omission in their <code>package.json</code> file
* Write a blog post about the process you took to complete this Pull Request, and about what happened next. Was it accepted? How long did it take? What did they say?
* Write about your feelings contributing to your first open source project. What went well? What was hard? What surprised you?

You should complete Lab 2 before the start of week 3.

Navigation menu