Skip to content

Commit

Permalink
Merge pull request #455 from GrimoireGL/develop
Browse files Browse the repository at this point in the history
fix contributing md
  • Loading branch information
kyasbal authored Mar 21, 2017
2 parents 772bee5 + d024981 commit c828367
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
29 changes: 27 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Guideline for contribution[WIP]
# Guideline for contribution

## Got a questions or problem?

Expand All @@ -22,6 +22,25 @@ This is including a lot of stuff to do, we need contributors. Even if you correc
Reducing works we need to do manually is very important.
Please read this guideline for keeping clean repository and keeping developing environment efficiently.

### Build library

You need to use npm to setup project build environment.(You can use yarn also)

```sh
$ git clone <Path to this repository> .
$ npm install
$ npm start
```

`npm start` trigger watch task to rebuild when you changed the codes in `src` folder.
This command will change `register/index.js` only.

If you need to build with all build configurations, you can use `npm run build -- --env.prod` to generate all codes.

`npm test` will execute unit testing included in `test` folder.

If you need to use with the other plugins, `npm link` would be useful to use generated new codes.

### Coding rule

Most of the coding rules are checked with `TSLint`. You can run `npm run lint` to check whether your code is fitting to coding rule.
Expand All @@ -43,9 +62,15 @@ Protected method name must begin with two `__`, and following characters are sam

### Commit message guideline

Currently the version of this package is managed by `semantic-release`.
The version of this package uses `semantic-release`.
To generate changelog and release new version automatically, please follow this rule.

### When the commit is only changing comments(Anything no effect for logics)

```
chore: COMMIT MESSAGE HERE
```

#### When the commit is bug fix,refactor or chore (Anything no effect for API).

```
Expand Down
3 changes: 2 additions & 1 deletion src/Base/XMLReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class XMLReader {
// throw new Error("Error parsing XML");
// }
if (!parsed || parsed.getElementsByTagName("parsererror").length > 0) {
throw new Error("Error parsing XML");
const err = new XMLSerializer().serializeToString(parsed);
throw new Error(`Error parsing XML: ${err}`);
}
if (rootElementName) {
if (parsed.documentElement.tagName.toUpperCase() !== rootElementName.toUpperCase()) {
Expand Down
2 changes: 2 additions & 0 deletions src/Converters/NumberConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ export default function NumberConverter(val: any): number {
return Number.parseFloat(val);
} else if (val === null) {
return null;
} else if (Array.isArray(val) && val.length === 1) {
return val[0];
}
}

0 comments on commit c828367

Please sign in to comment.