This repository was archived by the owner on Jun 30, 2022. It is now read-only.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>@deja-js/component documentation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./images/favicon.ico">
<link rel="stylesheet" href="./styles/style.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top visible-xs">
<a href="./" class="navbar-brand">@deja-js/component documentation</a>
<button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
</div>
<div class="xs-menu menu" id="mobile-menu">
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
</div>
<div class="container-fluid main">
<div class="row main">
<div class="hidden-xs menu">
<compodoc-menu mode="normal"></compodoc-menu>
</div>
<!-- START CONTENT -->
<div class="content getting-started">
<div class="content-data">
<h1 id="contributing-to-deja-js">Contributing to DEJA-JS</h1>
<p>We would love for you to contribute to DEJA-JS and help make it ever better!
As a contributor, here are the guidelines we would like you to follow:</p>
<ul>
<li><a href="#question">Question or Problem?</a></li>
<li><a href="#issue">Issues and Bugs</a></li>
<li><a href="#feature">Feature Requests</a></li>
<li><a href="#submit-pr">Submission Guidelines</a></li>
<li><a href="#rules">Coding Rules</a></li>
<li><a href="#commit">Commit Message Guidelines</a></li>
</ul>
<h2 id="-a-name-question-a-got-a-question-or-problem-"><a name="question"></a> Got a Question or Problem?</h2>
<p>Please open an issues with the label : <code>question</code>.</p>
<h2 id="-a-name-issue-a-found-an-issue-"><a name="issue"></a> Found an Issue?</h2>
<p>If you find a bug in the source code or a mistake in the documentation, you can help us by
<a href="#submit-issue">submitting an issue</a> to our [GitHub Repository][github]. Including an issue
reproduction (via CodePen, JsBin, Plunkr, etc.) is the absolute best way to help the team quickly
diagnose the problem. Screenshots are also helpful.</p>
<p>You can help the team even more and <a href="#submit-pr">submit a Pull Request</a> with a fix.</p>
<h2 id="-a-name-feature-a-want-a-feature-"><a name="feature"></a> Want a Feature?</h2>
<p>You can <em>request</em> a new feature by <a href="#submit-issue">submitting an issue</a> to our [GitHub
Repository][github]. If you would like to <em>implement</em> a new feature, please submit an issue with
a proposal for your work first, to be sure that we can use it.
Please consider what kind of change it is:</p>
<ul>
<li>For a <strong>Major Feature</strong>, first open an issue and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project.</li>
<li><strong>Small Features</strong> can be crafted and directly <a href="#submit-pr">submitted as a Pull Request</a>.</li>
</ul>
<h3 id="-a-name-submit-issue-a-submitting-an-issue"><a name="submit-issue"></a> Submitting an Issue</h3>
<p>Before you submit an issue, search the archive, maybe your question was already answered.</p>
<p>If your issue appears to be a bug, and hasn't been reported, open a new issue.
Help us to maximize the effort we can spend fixing issues and adding new
features by not reporting duplicate issues. Providing the following information will increase the
chances of your issue being dealt with quickly:</p>
<ul>
<li><strong>Overview of the Issue</strong> - if an error is being thrown a non-minified stack trace helps</li>
<li><strong>Angular and DEJA JS Versions</strong> - which versions of Angular and DEJA JS are affected
(e.g. 1.0.1)</li>
<li><strong>Motivation for or Use Case</strong> - explain what are you trying to do and why the current behavior
is a bug for you</li>
<li><strong>Browsers and Operating System</strong> - is this a problem with all browsers?</li>
<li><strong>Reproduce the Error</strong> - provide a live example (using [CodePen][codepen], [JsBin][jsbin],
[Plunker][plunker], etc.) or a unambiguous set of steps</li>
<li><strong>Screenshots</strong> - Due to the visual nature of DEJA JS, screenshots can help the team
triage issues far more quickly than a text descrption.</li>
<li><strong>Related Issues</strong> - has a similar issue been reported before?</li>
<li><strong>Suggest a Fix</strong> - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)</li>
</ul>
<h3 id="-a-name-submit-pr-a-submitting-a-pull-request-pr-"><a name="submit-pr"></a> Submitting a Pull Request (PR)</h3>
<p>Before you submit your Pull Request (PR) consider the following guidelines:</p>
<ul>
<li>Search <a href="https://github.com/DSI-HUG/dejajs-components/issues">GitHub</a> for an open or closed PR
that relates to your submission. You don't want to duplicate effort.</li>
<li><p>Make your changes in a new git branch:</p>
<div><pre class="line-numbers"><code class="language-shell"> git checkout -b my-fix-branch master</code></pre></div></li>
<li><p>Create your patch, <strong>including appropriate test cases</strong>.</p>
</li>
<li>Follow our <a href="#rules">Coding Rules</a>.</li>
<li>Test your changes with our supported browsers and screen readers.</li>
<li>Run the test suite : npm test</li>
<li><p>Commit your changes using a descriptive commit message that follows our
<a href="#commit">commit message conventions</a>. Adherence to these conventions
is necessary because release notes are automatically generated from these messages.</p>
<div><pre class="line-numbers"><code class="language-shell"> git cz</code></pre></div><p>Note: You need to install commitizen first : <a href="http://commitizen.github.io/cz-cli/">http://commitizen.github.io/cz-cli/</a></p>
</li>
<li><p>Push your branch to GitHub:</p>
<div><pre class="line-numbers"><code class="language-shell"> git push my-fork my-fix-branch</code></pre></div></li>
<li><p>In GitHub, send a pull request to <code>deja-js/component:dev</code>.</p>
</li>
<li><p>If we suggest changes then:</p>
<ul>
<li>Make the required updates.</li>
<li>Re-run the test suites to ensure tests are still passing.</li>
<li><p>Rebase your branch and force push to your GitHub repository (this will update your Pull
Request):</p>
<div><pre class="line-numbers"><code class="language-shell">git rebase master -i
git push -f</code></pre></div></li>
</ul>
</li>
</ul>
<p>That's it! Thank you for your contribution!</p>
<h4 id="after-your-pull-request-is-merged">After your pull request is merged</h4>
<p>After your pull request is merged, you can safely delete your branch and pull the changes
from the main (upstream) repository:</p>
<ul>
<li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as
follows:</p>
<div><pre class="line-numbers"><code class="language-shell"> git push my-fork --delete my-fix-branch</code></pre></div></li>
<li><p>Check out the master branch:</p>
<div><pre class="line-numbers"><code class="language-shell"> git checkout master -f</code></pre></div></li>
<li><p>Delete the local branch:</p>
<div><pre class="line-numbers"><code class="language-shell"> git branch -D my-fix-branch</code></pre></div></li>
<li><p>Update your master with the latest upstream version:</p>
<div><pre class="line-numbers"><code class="language-shell"> git pull --ff upstream master</code></pre></div></li>
</ul>
<h2 id="-a-name-rules-a-coding-rules"><a name="rules"></a> Coding Rules</h2>
<p>To ensure consistency throughout the source code, keep these rules in mind as you are working:</p>
<ul>
<li>All features or bug fixes <strong>must be tested</strong> by one or more specs (unit-tests).</li>
<li>All public API methods <strong>must be documented</strong>. (Details TBD).</li>
<li>We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
<strong>100 characters</strong>.</li>
</ul>
<h2 id="-a-name-commit-a-commit-message-guidelines"><a name="commit"></a> Commit Message Guidelines</h2>
<p>Since 05.10.2017, we have very precise rules over how our git commit messages can be formatted. This leads to <strong>more
readable messages</strong> that are easy to follow when looking through the <strong>project history</strong>. But also,
we use the git commit messages to <strong>generate the change log</strong>.</p>
<h3 id="commit-message-format">Commit Message Format</h3>
<p>The commit message must respect this format that includes a <strong>type</strong>, a <strong>scope</strong> and a <strong>subject</strong>:</p>
<div><pre class="line-numbers"><code class="language-none"><type>(<scope>): <subject></code></pre></div><p>The <strong>header</strong> is mandatory and the <strong>scope</strong> of the header is optional.</p>
<p>Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.</p>
<h3 id="type">Type</h3>
<p>Must be one of the following:</p>
<ul>
<li><strong>feat</strong>: A new feature</li>
<li><strong>fix</strong>: A bug fix</li>
<li><strong>docs</strong>: Documentation only changes</li>
<li><strong>style</strong>: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)</li>
<li><strong>refactor</strong>: A code change that neither fixes a bug nor adds a feature</li>
<li><strong>perf</strong>: A code change that improves performance</li>
<li><strong>test</strong>: Adding missing tests or correcting existing tests</li>
<li><strong>build</strong>: Changes that affect the build system, CI configuration or external dependencies<div><pre class="line-numbers"><code class="language-none"> (example scopes: gulp, broccoli, npm)</code></pre></div></li>
<li><strong>ci</strong>: Configuration files</li>
<li><strong>chore</strong>: Other changes that don't modify <code>src</code> or <code>test</code> files</li>
<li><strong>revert</strong>: Revert another commit</li>
<li><strong>quiet</strong>: Not documented in readme.md</li>
</ul>
<h3 id="scope">Scope</h3>
<p>The scope could be anything specifying place of the commit change. For example
<code>DejaDatePicker</code>, <code>DejaMonacoEditor</code>, etc.</p>
<h3 id="subject">Subject</h3>
<p>The subject contains succinct description of the change:</p>
<ul>
<li>use the imperative, present tense: "change" not "changed" nor "changes"</li>
<li>don't capitalize first letter</li>
<li>no dot (.) at the end</li>
</ul>
<p><strong>Breaking Changes</strong> should start with the word <code>BREAKING CHANGE:</code> with a space or two newlines.
The rest of the commit message is then used for this.</p>
<p>A detailed explanation can be found in this [document][commit-message-format].</p>
</div><div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> result-matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
<!-- END CONTENT -->
</div>
</div>
<script>
var COMPODOC_CURRENT_PAGE_DEPTH = 0;
var COMPODOC_CURRENT_PAGE_CONTEXT = 'getting-started';
var COMPODOC_CURRENT_PAGE_URL = 'contributing.html';
</script>
<script src="./js/libs/custom-elements.min.js"></script>
<script src="./js/libs/lit-html.js"></script>
<!-- Required to polyfill modern browsers as code is ES5 for IE... -->
<script src="./js/libs/custom-elements-es5-adapter.js" charset="utf-8" defer></script>
<script src="./js/menu-wc.js" defer></script>
<script src="./js/libs/bootstrap-native.js"></script>
<script src="./js/libs/es6-shim.min.js"></script>
<script src="./js/libs/EventDispatcher.js"></script>
<script src="./js/libs/promise.min.js"></script>
<script src="./js/libs/zepto.min.js"></script>
<script src="./js/compodoc.js"></script>
<script src="./js/tabs.js"></script>
<script src="./js/menu.js"></script>
<script src="./js/libs/clipboard.min.js"></script>
<script src="./js/libs/prism.js"></script>
<script src="./js/sourceCode.js"></script>
<script src="./js/search/search.js"></script>
<script src="./js/search/lunr.min.js"></script>
<script src="./js/search/search-lunr.js"></script>
<script src="./js/search/search_index.js"></script>
<script src="./js/lazy-load-graphs.js"></script>
</body>
</html>