- Please be as descriptive as possible about your problem. "Stuff doesn't work" won't help us to help you.
- When reporting an issue, provide a jsfiddle example (or something like it, such as codepen) which reproduces your problem.
- Always state the following key points:
- What were you trying to accomplish? (Infinite scroll, subscribe to click events, ...)
- What steps did you take? (Use Ink.Dom.Element.inViewport, try to capture the
domready
event, ...) - What results did you expect, instead of what you see now?
- What version of Ink are you using?
We're a small team and have other projects in our hands so, we'll try to at least give you some feedback on issues, even if it's just a comment on a maximum of 3 business days. Please be patient.
We'd love to have your contribution so, here's a quick guide:
- Fork our repository
- Do your work on the
develop
branch
- To make sure your changes don't break anything run
grunt test
. We'll only accept pull requests that pass unit tests. - Add a test for your changes. If you are adding functionality or fixing a bug, you have to write tests!
- Make sure all tests are passing.
- Push to your fork and submit a pull request.
- No tabs. Use four spaces for indentation.
- Use camel case for method names.
- Private/internal methods must start with underscore, e.g.
_onClick: function(e){...}
- Component names are camel cased and start with a capital letter, e.g.
Ink.Ext.MyPhotoGallery
- All Ink code should pass
grunt jshint
to ensure code quality and maintainability. Use inline directives only if you have a good reason to. - (If you're adding a new component) Add your new components under the
Ink.Ext
namespace with Ink.createExt():Ink.createExt('MyAwesomeModule', 1, ['Ink.Dom.Event_1'], function(InkEvent) { var MyAwesomeModule = function() { this._init(); }; MyAwesomeModule.prototype = { _init: function() { this._doStuff(); }, _doStuff: function() { alert('Doing stuff in MyAwesomeModule'); /* ... */ } }; return MyAwesomeModule; });
- To Make sure your changes don't break compilation, run
grunt css
. - Push to your fork and submit a pull request. Please be as descriptive as possible about the reason for your changes.
We're not really strict with Sass code but adhering to these guidelines will help us:
- Two spaces, no tabs.
- Try to declare each css property on a single line.
- Use shorthand declarations whenever possible;
- Check if compass already has a @mixin for what you need before writing new ones.
Our documentation is built with Jekyll. Get familiar with it.
- Changes to the documentation must me submitted to this separate repository.