Skip to content

Commit 8de3cf0

Browse files
author
Martin Martinez Rivera
committed
Merge branch 'master' of github.com:linkeddata/ldnode
Conflicts: README.md
2 parents 8873305 + 3130342 commit 8de3cf0

2 files changed

Lines changed: 148 additions & 12 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# CONTRIBUTING
2+
3+
The MIT Linked Data group and the `ldnode` project welcomes new contributors. This document will guide you
4+
through the process.
5+
6+
### Step 1: FORK
7+
8+
Fork the project [on GitHub](https://github.com/linkeddata/ldnode) and check out
9+
your copy.
10+
11+
```sh
12+
$ git clone git@github.com:your_username/ldnode.git
13+
$ cd ldnode
14+
$ git remote add upstream git://github.com/linkeddata/ldnode.git
15+
```
16+
17+
18+
### Step 2: BRANCH
19+
20+
Create a feature branch and start hacking:
21+
22+
```sh
23+
$ git checkout -b my-feature-branch -t origin/master
24+
```
25+
26+
27+
### Step 3: COMMIT
28+
29+
Make sure git knows your name and email address:
30+
31+
```sh
32+
$ git config --global user.name "J. Random User"
33+
$ git config --global user.email "j.random.user@example.com"
34+
```
35+
36+
Writing good commit logs is important. A commit log should describe what
37+
changed and why. Follow these guidelines when writing one:
38+
39+
1. The first line should be 50 characters or less and contain a short
40+
description of the change prefixed with the name of the changed
41+
subsystem (e.g. "net: add localAddress and localPort to Socket").
42+
2. Keep the second line blank.
43+
3. Wrap all other lines at 72 columns.
44+
45+
A good commit log looks like this:
46+
47+
```
48+
subsystem: explaining the commit in one line
49+
50+
Body of commit message is a few lines of text, explaining things
51+
in more detail, possibly giving some background about the issue
52+
being fixed, etc etc.
53+
54+
The body of the commit message can be several paragraphs, and
55+
please do proper word-wrap and keep columns shorter than about
56+
72 characters or so. That way `git log` will show things
57+
nicely even when it is indented.
58+
```
59+
60+
The header line should be meaningful; it is what other people see when they
61+
run `git shortlog` or `git log --oneline`.
62+
63+
Check the output of `git log --oneline files_that_you_changed` to find out
64+
what subsystem (or subsystems) your changes touch.
65+
66+
67+
### Step 4: REBASE
68+
69+
Use `git rebase` (not `git merge`) to sync your work from time to time.
70+
71+
```sh
72+
$ git fetch upstream
73+
$ git rebase upstream/master
74+
```
75+
76+
77+
### Step 5: TEST
78+
79+
Bug fixes and features should come with tests. Add your tests in the
80+
`test/` directory. Look at other tests to see how they should be
81+
structured (license boilerplate, common includes, etc.).
82+
83+
```sh
84+
$ npm test
85+
```
86+
87+
Makeall tests pass. Please, do not submit patches that fail either check.
88+
89+
90+
### Step 6: PUSH
91+
92+
```sh
93+
$ git push origin my-feature-branch
94+
```
95+
96+
Go to https://github.com/username/ldnode and select your feature branch. Click
97+
the 'Pull Request' button and fill out the form.
98+
99+
Pull requests are usually reviewed within a few days. If there are comments
100+
to address, apply your changes in a separate commit and push that to your
101+
feature branch. Post a comment in the pull request afterwards; GitHub does
102+
not send out notifications when you add commits.
103+
104+
## Using HUB
105+
106+
[hub](https://hub.github.com/) is a tool released by Github to help developers to use their website from command line.
107+
108+
The described guidelines can be resumed as following:
109+
110+
```bash
111+
$ git clone https://github.com/linkeddata/ldnode
112+
$ cd ldnode
113+
114+
# to fork the repository
115+
$ hub fork
116+
117+
# to fork the repository
118+
$ git checkout -b feature-branch
119+
120+
# after committing your changes, push to your repo
121+
$ git push your_username feature-branch
122+
123+
# start a PR
124+
$ hub pull-request
125+
```
126+
127+
This document is forked from [joyent/node](https://github.com/joyent/node/blob/master/CONTRIBUTING.md)
128+
129+
130+
[issue tracker]: https://github.com/linkeddata/ldnode/issues

‎README.md‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ In case the `settings` is not passed, then it will start with the following defa
5050
}
5151
```
5252

53-
### Examples
5453

5554
#### Simple
5655

@@ -79,7 +78,15 @@ app.listen(3000, function() {
7978
...
8079
```
8180

82-
### Command line tool
81+
#### Logs
82+
83+
Run your app with the `DEBUG` variable set:
84+
85+
```bash
86+
$ DEBUG="ldnode:*" node app.js
87+
```
88+
89+
## Command line tool
8390

8491
npm install -g ldnode
8592

@@ -106,19 +113,14 @@ Options:
106113
107114
```
108115

109-
### Logging
110-
111-
If you are running your own app
112116

113-
```bash
114-
$ DEBUG="ldnode:*" node app.js
115-
```
117+
## Package scripts
116118

117-
or simply
119+
There are some scripts in the [package.json](https://github.com/linkeddata/ldnode/blob/master/package.json):
118120

119-
```bash
120-
$ ldnode -v
121-
```
121+
- `npm start`: starts a very basic ldnode with default configs
122+
- `npm run ldp-webid`: run ldnode with SSL and WebID+TLS enabled (remember it runs in HTTPS)
123+
- `npm run ldp-ssl`: same as the above without WebID+TLS support
122124

123125
### Package scripts
124126

@@ -144,6 +146,10 @@ In order to test a single component, you can run
144146
npm run test-(acl|formats|params|patch)
145147
```
146148

149+
## Contributing
150+
151+
Do you want to contribute? Sure, have a look at [CONTRIBUTING.md](https://github.com/linkeddata/ldnode/blob/master/CONTRIBUTING.md).
152+
147153
## License
148154

149155
MIT

0 commit comments

Comments
 (0)