Skip to content

Commit 4eedd69

Browse files
committed
Add contribution guide
1 parent 441c659 commit 4eedd69

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

CONTRIBUTING.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Contributing
2+
------------
3+
We love contributions!
4+
5+
Contact @davidlgj or @Anthropic to ensure you don't work on something already in progress!
6+
7+
A few things to note:
8+
* Error messages are not handled in the standard Angular Material way due to ASF behaviour.
9+
To add messages to a template add **sf-messages** to the **parent** you want messages to be the last child of.
10+
* Look at the API page for the Angular Material component you are looking at, there are possibly a few attributes
11+
not used in the demo that may be useful. Please try to add as many useful attributes as you can, we can discuss the
12+
best way to implement them in the ASF form data.
13+
14+
As an example, if the template requires a remote titleMap, consider adding optionData as a variable in the form definition that can contain a text string reference to a variable on the sf-form $scope.
15+
16+
**Please base any merge request on the *development* branch instead of *master*.**
17+
18+
The reason for this is that we're only really using *development* for now but will eventually start trying to use
19+
[git flow](http://danielkummer.github.io/git-flow-cheatsheet/), and it makes merging your pull
20+
request a heck of a lot easier for us.
21+
22+
Please **avoid including the material-decorator.js or material-decorator.min.js** as that can make merging harder, and we
23+
will always generate these files when we make a new release.
24+
25+
If its a new field type consider making it an add-on instead,
26+
especially if it has external dependencies. See [extending Schema Form documentation.](docs/extending.md)
27+
28+
With new features we love to see updates to the docs as well as tests, that makes it super
29+
easy and fast for us to merge it!
30+
31+
Also consider running any code through the code style checker [jscs](https://github.com/mdevils/node-jscs)
32+
(or even better use it in your editor) using the .jscsrc file in the repo root, which should be picked up by the IDE. You can also us `gulp jscs` to
33+
check your code.

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ Known Issues
3030
* Only basic support for inputs, textarea, radios, radiobuttons, checkboxes, datepicker and tabs are implemented.
3131
* Angular material theme only works when `$mdThemingProvider.alwaysWatchTheme(true);` is used.
3232
* Until Angular Material hits 1.0.0 there is still chances that features may break again.
33+
34+
Contributing
35+
------------
36+
Contributions are welcome! Please see [Contributing.md](CONTRIBUTING.md) for more info.

gulpfile.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ var gulp = require('gulp'),
44
templateCache = require('gulp-angular-templatecache'),
55
concat = require('gulp-concat'),
66
rename = require('gulp-rename'),
7-
uglify = require('gulp-uglify');
7+
uglify = require('gulp-uglify'),
8+
jscs = require('gulp-jscs');
89

910
gulp.task('build', function() {
10-
var stream = streamqueue({objectMode: true});
11+
var stream = streamqueue({ objectMode: true });
1112
stream.queue(
1213
gulp.src('./src/**/*.html')
1314
.pipe(minifyHtml({
@@ -31,9 +32,13 @@ gulp.task('build', function() {
3132

3233
});
3334

35+
gulp.task('jscs', function() {
36+
gulp.src('./src/**/*.js')
37+
.pipe(jscs());
38+
});
3439

3540
gulp.task('watch', function() {
36-
gulp.watch('./src/**/*', ['default']);
41+
gulp.watch('./src/**/*', [ 'default' ]);
3742
});
3843

39-
gulp.task('default', ['build']);
44+
gulp.task('default', [ 'build' ]);

0 commit comments

Comments
 (0)