Skip to content

Commit a973957

Browse files
authored
Create CONTRIBUTING.md
1 parent 951c404 commit a973957

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

CONTRIBUTING.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
Contributing
2+
============
3+
- [How to setup to develop](#setup)
4+
- [How to build the package](#build)
5+
- [Working on the libraries](#work)
6+
- [PR requirements](#requirements)
7+
8+
<a name="setup"></a>
9+
## How to setup to develop
10+
To get started clone all json-schema-form library repos into sibling folders.
11+
json-schema-form-core
12+
angular-schema-form
13+
angular-schema-form-bootstrap
14+
angular-schema-form-material
15+
16+
Once cloned each repo has npm commands for assisting development
17+
```bash
18+
# Run unit tests
19+
npm run test
20+
21+
# Run the build
22+
npm run build
23+
24+
# Run the build and minify
25+
npm run dist # not in json-schema-form-core
26+
27+
# Run the build and watch for changes
28+
npm run watch
29+
```
30+
31+
<a name="build"></a>
32+
## How to build the package
33+
When working on `angular-schema-form` running the `npm build` will look for a sibling
34+
folder when importing `json-schema-form-core`. This allows you to work on bugs or
35+
issues that require work on both libraries simultaneously.
36+
37+
This is set up for bootstrap and material design decorators also.
38+
39+
The bootstrap repo is required to build `angular-schema-form` with the bootstrap
40+
decorator bundle distribution.
41+
42+
<a name="work"></a>
43+
## Working on the libraries
44+
When I work on the libraries I use a multi-tab console tool like
45+
Terminator (Linux) or ConEmu (Windows)
46+
47+
Run each of the following in a separate tab:
48+
```bash
49+
json-schema-form-core> npm run watch
50+
json-schema-form-core> npm run test
51+
angular-schema-form> npm run watch
52+
angular-schema-form> npm run test
53+
```
54+
This will re-compile all the libraries after changes that affect them which
55+
then runs the related tests.
56+
57+
A static file web server is required to run the examples, but the example
58+
can be used to run saved gist of the example app. It can help to add a model
59+
to one of the example app json files to test with.
60+
61+
<a name="requirements"></a>
62+
## PR requirements
63+
We love contributions!
64+
65+
**Please base any merge request on the _development_ branch instead of _master_.**
66+
67+
The reason for this is that we're trying to use
68+
[git flow](http://danielkummer.github.io/git-flow-cheatsheet/), and it makes merging your pull
69+
request a heck of a lot easier for us.
70+
71+
Please **avoid including anything from the `dist/`** directory as that can make merging harder, and we
72+
always generate these files when we make a new release.
73+
74+
**If you are using this library with another repo other than *ASF* it must still maintain compatibility
75+
with *ASF* which is why the instructions for *ASF* are above**, eventually there will be enough test
76+
cases that you wont need to test both, but we aren't there yet.
77+
78+
**The bootstrap decorator, has been moved to it's own repo. It's here [github.com/json-schema-form/angular-schema-form-bootstrap](https://github.com/json-schema-form/angular-schema-form-bootstrap)**
79+
80+
Feel free to submit issues on the main repo anyway though.
81+
82+
If its a new field type consider making it an add-on instead,
83+
especially if it has external dependencies. See [extending Schema Form documentation.](docs/extending.md)
84+
85+
With new features we love to see updates to the docs as well as tests, that makes it super
86+
easy and fast for us to merge it!
87+
88+
Also consider running any code through the code style checker [jscs](https://github.com/mdevils/node-jscs)
89+
(or even better use it in your editor) with preset set to `google`. You can also
90+
use `gulp jscs` to check your code. I hope to set up ESLint in the not too distant future.

0 commit comments

Comments
 (0)