This repository has been archived by the owner on May 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Added contribution, developer and license guidelines, upd…
…ated readme
- Loading branch information
Showing
5 changed files
with
305 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# Contributing to Ubiquits | ||
|
||
We would love for you to contribute to Ubiquits and help make it even better than it is | ||
today! As a contributor, here are the guidelines we would like you to follow: | ||
|
||
- [Question or Problem?](#question) | ||
- [Issues and Bugs](#issue) | ||
- [Feature Requests](#feature) | ||
- [Submission Guidelines](#submit) | ||
- [Commit Message Guidelines](#commit) | ||
|
||
## <a name="question"></a> Got a Question or Problem? | ||
|
||
If you have questions about how to *use* Ubiquits, please ask in the [Gitter Channel][gitter] | ||
discussion list or [StackOverflow][stackoverflow] with the tag `ubiquits`. Please note that Ubiquits is still in early developer preview, and the core team's capacity to answer usage questions is limited. | ||
|
||
## <a name="issue"></a> Found an Issue? | ||
If you find a bug in the source code or a mistake in the documentation, you can help us by | ||
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can | ||
[submit a Pull Request](#submit-pr) with a fix. | ||
|
||
## <a name="feature"></a> Want a Feature? | ||
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub | ||
Repository][github]. If you would like to *implement* 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: | ||
|
||
* For a **Major Feature**, 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. | ||
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). | ||
|
||
## <a name="submit"></a> Submission Guidelines | ||
|
||
### <a name="submit-issue"></a> Submitting an Issue | ||
Before you submit an issue, search the archive, maybe your question was already answered. | ||
|
||
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: | ||
|
||
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps | ||
* **Ubiquits Version** - what version of Ubiquits is affected (e.g. 0.3.21) | ||
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you | ||
* **Browsers and Operating System** - is this a problem with all browsers? | ||
* **Related Issues** - has a similar issue been reported before? | ||
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be | ||
causing the problem (line of code or commit) | ||
|
||
You can file new issues by providing the above information [here](https://github.com/ubiquits/ubiquits/issues/new). | ||
|
||
|
||
### <a name="submit-pr"></a> Submitting a Pull Request (PR) | ||
Before you submit your Pull Request (PR) consider the following guidelines: | ||
|
||
* Search [GitHub](https://github.com/ubiquits/ubiquits/pulls) for an open or closed PR | ||
that relates to your submission. You don't want to duplicate effort. | ||
* Make your changes in a new git branch: | ||
|
||
```shell | ||
git checkout -b my-fix-branch master | ||
``` | ||
|
||
* Create your patch, **including appropriate test cases**. | ||
* Follow our [Coding Rules](#rules). | ||
* Run the full Ubiquits test suite, as described in the [developer documentation][dev-doc], | ||
and ensure that all tests pass. | ||
* Commit your changes using a descriptive commit message that follows the | ||
[Angular commit message conventions](#commit). Adherence to these conventions | ||
is necessary because release notes are automatically generated from these messages. | ||
|
||
```shell | ||
git commit -a | ||
``` | ||
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. | ||
|
||
* Push your branch to GitHub: | ||
|
||
```shell | ||
git push origin my-fix-branch | ||
``` | ||
|
||
* In GitHub, send a pull request to `ubiquits:master`. | ||
* If we suggest changes then: | ||
* Make the required updates. | ||
* Re-run the Ubiquits test suites for JS and Dart to ensure tests are still passing. | ||
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request): | ||
|
||
```shell | ||
git rebase master -i | ||
git push -f | ||
``` | ||
|
||
That's it! Thank you for your contribution! | ||
#### After your pull request is merged | ||
After your pull request is merged, you can safely delete your branch and pull the changes | ||
from the main (upstream) repository: | ||
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: | ||
```shell | ||
git push origin --delete my-fix-branch | ||
``` | ||
* Check out the master branch: | ||
```shell | ||
git checkout master -f | ||
``` | ||
* Delete the local branch: | ||
```shell | ||
git branch -D my-fix-branch | ||
``` | ||
* Update your master with the latest upstream version: | ||
```shell | ||
git pull --ff upstream master | ||
``` | ||
## <a name="commit"></a> Commit Message Guidelines | ||
We follow the Angular 2 commit message format. See the details [here][commit-message-format] | ||
*This document is modified from the [Angular 2 contribution guide](https://github.com/angular/angular/blob/master/CONTRIBUTING.md)* | ||
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# | ||
[dev-doc]: https://github.com/ubiquits/ubiquits/blob/master/DEVELOPER.md | ||
[github]: https://github.com/ubiquits/ubiquits | ||
[gitter]: https://gitter.im/ubiquits/ubiquits | ||
[stackoverflow]: http://stackoverflow.com/questions/tagged/ubiquits | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Building and Testing Ubiquits | ||
|
||
This document describes how to set up your development environment to build and test Ubiquits. | ||
|
||
|
||
* [Prerequisite Software](#prerequisite-software) | ||
* [Getting the Sources](#getting-the-sources) | ||
* [Environment Variable Setup](#environment-variable-setup) | ||
* [Installing NPM Modules and Dart Packages](#installing-npm-modules-and-dart-packages) | ||
* [Build commands](#build-commands) | ||
* [Running Tests Locally](#running-tests-locally) | ||
* [Code Style](#code-style) | ||
* [Project Information](#project-information) | ||
* [CI using Travis](#ci-using-travis) | ||
* [Transforming Dart code](#transforming-dart-code) | ||
* [Debugging](#debugging) | ||
|
||
See the [contribution guidelines](https://github.com/ubiquits/ubiquits/blob/master/CONTRIBUTING.md) | ||
if you'd like to contribute to Ubiquits. | ||
|
||
## Prerequisite Software | ||
|
||
Before you can build and test Ubiquits, you must install and configure the | ||
following products on your development machine: | ||
|
||
* [Git](http://git-scm.com) and/or the **GitHub app** (for [Mac](http://mac.github.com) or | ||
[Windows](http://windows.github.com)); [GitHub's Guide to Installing Git](https://help.github.com/articles/set-up-git) is a good source of information. | ||
|
||
* [Node.js](http://nodejs.org), (version `>=5.4.1 <6`) which is used to run a development web server, | ||
run tests, and generate distributable files. We also use Node's Package Manager, `npm` | ||
(version `>=3.5.3 <4.0`), which comes with Node. Depending on your system, you can install Node either from | ||
source or as a pre-packaged bundle. | ||
|
||
## Getting the Sources | ||
|
||
Fork and clone the Ubiquits repository: | ||
|
||
1. Login to your GitHub account or create one by following the instructions given | ||
[here](https://github.com/signup/free). | ||
2. [Fork](http://help.github.com/forking) the [main Ubiquits | ||
repository](https://github.com/ubiquits/ubiquits). | ||
3. Clone your fork of the Ubiquits repository and define an `upstream` remote pointing back to | ||
the Ubiquits repository that you forked in the first place. | ||
|
||
```shell | ||
# Clone your GitHub repository: | ||
git clone [email protected]:<github username>/ubiquits.git | ||
|
||
# Go to the Ubiquits directory: | ||
cd ubiquits | ||
|
||
# Add the main Ubiquits repository as an upstream remote to your repository: | ||
git remote add upstream https://github.com/ubiquits/ubiquits.git | ||
``` | ||
|
||
## Installing NPM Modules and Dart Packages | ||
|
||
Next, install the JavaScript modules and Dart packages needed to build and test Ubiquits: | ||
|
||
```shell | ||
# Install Ubiquits project dependencies (package.json) | ||
npm install | ||
``` | ||
|
||
## Build commands | ||
|
||
To build Ubiquits and prepare tests, run: | ||
|
||
```shell | ||
u build | ||
``` | ||
|
||
Notes: | ||
* Library output is put in the `lib` folder. | ||
|
||
You can selectively test either the browser or server suites as follows: | ||
|
||
* `u build browser` | ||
* `u build server` | ||
|
||
To clean out the `dist` folder, run: | ||
|
||
```shell | ||
u clean | ||
``` | ||
|
||
## Running Tests Locally | ||
|
||
### Full test suite | ||
|
||
* `u test`: full test suite for both browser and server of Ubiquits. These are the same tests | ||
that run on Travis. | ||
|
||
You can selectively run either environment as follows: | ||
|
||
* `u test server` | ||
* `u test browser` | ||
|
||
**Note**: If you want to only run a single test you can alter the test you wish to run by changing | ||
`it` to `iit` or `describe` to `ddescribe`. This will only run that individual test and make it | ||
much easier to debug. `xit` and `xdescribe` can also be useful to exclude a test and a group of | ||
tests respectively. | ||
|
||
### Linting | ||
|
||
We use [tslint](https://github.com/palantir/tslint) for linting. See linting rules in [gulpfile](gulpfile.js). To lint, run | ||
|
||
```shell | ||
$ u lint | ||
``` | ||
|
||
## Generating the API documentation | ||
|
||
The following gulp task will generate the API docs in the `dist-docs` directory: | ||
|
||
```shell | ||
$ u doc build | ||
``` | ||
|
||
You can serve the generated documentation to check how it would render on [ubiquits.com](https://ubiquits.com): | ||
```shell | ||
$ u doc watch | ||
``` | ||
|
||
Then open your browser to [http://localhost:8080](http://localhost:8080) to view the docs. Note that any edits to the | ||
markdown files that make up the docs will be live reloaded, but changes to assets or templates will need a restart to the | ||
doc watcher. | ||
|
||
*This document is modified from the [Angular 2 developer guide](https://github.com/angular/angular/blob/master/DEVELOPER.md)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2016 Zak Henry | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters