- Keep directives as simple as possible
- Use plain angular, without jQuery or other libs.
- If it makes the directive easier, change the syntax from jqm. We don't want too many hacks in this lib - it should be easy to maintain.
- Try to put the presentation logic in the template, and the business logic into the javascript.
- For directives with isolate scopes, use jqm-scope-as (TODO: Explain jqm-scope-as)
- Clone the repository
- Run
npm install
andgrunt install
- Run
grunt
. This will install the pre-commit hooks to ensure a consistent format for commit messages. - Create a local feature branch
- Make all your changes in that branch. You may want to use
grunt dev
to watch your files and automatically execute your tests. - When you are finished run
grunt
without arguments until you have no errors. - Stash all your commits into one commit (see e.g. http://davidwalsh.name/squash-commits-git), using our rules for commit messages: https://github.com/btford/grunt-conventional-changelog
- Push your changes to your github user
- Create a pull request for this commit
- Read the corresponding issue in the issue tracker and the jqm docs mentioned in the issue.
- Add a comment in the issue that you start to work on this issue (so we don't have multiple people working on the same thing).
- Add a new file under
src/directives
. - Add a template under
src/templates
. - Create unit tests for your directive that compare the DOM generated by your directive with the DOM generated by jqm. See the other directives for examples, and
test/lib/testutils.js
for tools on this. - Create normal unit tests for your directive. See the other directives for examples.
- Create inline docs that can be processed by https://github.com/m7r/grunt-ngdocs. As an example see https://github.com/opitzconsulting/angular-jqm/blob/master/src/directives/jqmCheckbox.js.
- Try your directive: Add it to
test/ngSnippet.html
and openhttp://localhost:9000/test/ngSnippet.html
. You can also try the corresponding jqm widget usingtest/jqmSnippet.html
.