From ed4586aa82d00cfde1021992d7c3e46d2a8d20f3 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\radeva" Date: Tue, 20 Feb 2018 18:10:05 +0200 Subject: [PATCH 1/2] docs: update readme + contribution guidelines --- .github/pull_request_template.md | 36 +++++++++++++++ CONTRIBUTING.md | 75 ++++++++++++++++++++++++++++++++ DevelopmentWorkflow.md | 41 +++++++++++++++++ README.md | 10 +++-- src/package.json | 2 + 5 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md create mode 100644 DevelopmentWorkflow.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..e1becd3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,36 @@ + + + + + +## PR Checklist + +- [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. +- [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. +- [ ] All existing tests are passing +- [ ] Tests for the changes are included + +## What is the current behavior? + + +## What is the new behavior? + + +Fixes/Implements/Closes #[Issue Number]. + + + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0cc8e5d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,75 @@ +# Contributing to NativeScript Imagepicker + +:+1: First of all, thank you for taking the time to contribute! :+1: + +Here are some guides on how to do that: + + + +- [Code of Conduct](#code-of-conduct) +- [Reporting Bugs](#reporting-bugs) +- [Requesting Features](#requesting-features) +- [Submitting a PR](#submitting-a-pr) +- [Where to Start](#where-to-start) + + + +## Code of Conduct +Help us keep a healthy and open community. We expect all participants in this project to adhere to the [NativeScript Code Of Conduct](https://github.com/NativeScript/codeofconduct). + + +## Reporting Bugs + +1. Always update to the most recent master release; the bug may already be resolved. +2. Search for similar issues in the issues list for this repo; it may already be an identified problem. +3. If this is a bug or problem that is clear, simple, and is unlikely to require any discussion -- it is OK to open an issue on GitHub with a reproduction of the bug including workflows and screenshots. If possible, submit a Pull Request with a failing test, entire application or module. If you'd rather take matters into your own hands, fix the bug yourself (jump down to the [Submitting a PR](#submitting-a-pr) section). + +## Requesting Features + +1. Use Github Issues to submit feature requests. +2. First, search for a similar request and extend it if applicable. This way it would be easier for the community to track the features. +3. When requesting a new feature, please provide as much detail as possible about why you need the feature in your apps. We prefer that you explain a need rather than explain a technical solution for it. That might trigger a nice conversation on finding the best and broadest technical solution to a specific need. + +## Submitting a PR + +Before you begin make sure there is an issue for the bug or feature you will be working on. + +Following these steps is the best way to get your code included in the project: + +1. Fork and clone the nativescript-camera repo: +```bash +git clone https://github.com//nativescript-camera.git +# Navigate to the newly cloned directory +cd nativescript-camera +# Add an "upstream" remote pointing to the original repo. +git remote add upstream https://github.com/NativeScript/nativescript-camera.git +``` + +2. Read our [development workflow guide](DevelopmentWorkflow.md) for local setup + +3. Create a branch for your PR +```bash +git checkout -b master +``` + +4. The fun part! Make your code changes. Make sure you: + - Follow the [code conventions guide](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md). + - Follow the [commit message guidelines](https://github.com/NativeScript/NativeScript/blob/pr-template/CONTRIBUTING.md#commit-messages) + - Update the README if you make changes to the plugin API + +5. Before you submit your PR: + - Rebase your changes to the latest master: `git pull --rebase upstream master`. + - Ensure your changes pass tslint validation. (run `npm run tslint` in the `src` folder). + +6. Push your fork. If you have rebased you might have to use force-push your branch: +``` +git push origin --force +``` + +7. [Submit your pull request](https://github.com/NativeScript/nativescript-camera/compare) and compare to `NativeScript/nativescript-camera`. Please, fill in the Pull Request template - it will help us better understand the PR and increase the chances of it getting merged quickly. + +It's our turn from there on! We will review the PR and discuss changes you might have to make before merging it! Thanks! + +## Where to Start + +If you want to contribute, but you are not sure where to start - look for issues labeled [`help wanted`](https://github.com/NativeScript/nativescript-camera/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). diff --git a/DevelopmentWorkflow.md b/DevelopmentWorkflow.md new file mode 100644 index 0000000..fee9eec --- /dev/null +++ b/DevelopmentWorkflow.md @@ -0,0 +1,41 @@ +# Development Workflow + + + +- [Prerequisites](#prerequisites) +- [Develop locally](#develop-locally) + + + + +## Prerequisites + +* Install your native toolchain and NativeScript as [described in the docs](https://docs.nativescript.org/start/quick-setup) + +* Review [NativeScript plugins documentation](https://docs.nativescript.org/plugins/plugins) for more details on plugins development + + +## Develop locally + +For local development we recommend using the npm commands provided in the plugin's package.json + +Basically executing a bunch of commands will be enough for you to start making changes to the plugin and see them live synced in the demo. It's up to you to decide which demo to use for development - TypeScript or TypeScript + Angular. + + +To run and develop using TypeScript demo: +```bash +$ cd nativescript-camera/src +$ npm run demo.ios +$ npm run demo.android +``` + +To run and develop using TypeScript + Angular demo: +```bash +$ cd nativescript-camera/src +$ npm run demo.ng.ios +$ npm run demo.ng.android +``` + +After all the changes are done make sure to test them in all the demo apps. + +For details on plugins development workflow, read [NativeScript plugins documentation](https://docs.nativescript.org/plugins/building-plugins#step-2-set-up-a-development-workflow) covering that topic. \ No newline at end of file diff --git a/README.md b/README.md index a629fb8..3560655 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,11 @@ var isAvailable = camera.isAvailable(); ``` > Note: This method will return false when used in iOS simulator (as the simulator does not have camera hardware) - -## License -Apache License Version 2.0, January 2004 +## Contribute +We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-camera/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). + +## Get Help +Please, use [github issues](https://github.com/NativeScript/nativescript-camera/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation). + +![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-camera?pixel) \ No newline at end of file diff --git a/src/package.json b/src/package.json index 5345fa3..2c9e3ee 100644 --- a/src/package.json +++ b/src/package.json @@ -25,6 +25,8 @@ "plugin.tscwatch": "npm run tsc -- -w", "demo.ios": "npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles", "demo.android": "npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles", + "demo.ng.ios": "npm i && npm run tsc && cd ../demo-angular && tns run ios --syncAllFiles", + "demo.ng.android": "npm i && npm run tsc && cd ../demo-angular && tns run android --syncAllFiles", "demo.reset": "cd ../demo && rimraf platforms", "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-camera && tns plugin add ../src", "clean": "cd ../demo && rimraf hooks node_modules platforms && cd ../src && rimraf node_modules && npm run plugin.link", From 86fa93074b89b800299b61e39ba792203f780e12 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\radeva" Date: Fri, 2 Mar 2018 09:51:32 +0200 Subject: [PATCH 2/2] docs: fix title --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0cc8e5d..0a39c89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to NativeScript Imagepicker +# Contributing to NativeScript Camera :+1: First of all, thank you for taking the time to contribute! :+1: