Skip to content

Commit cdf7b29

Browse files
author
radeva
authored
Merge pull request #43 from NativeScript/radeva/update-readme
docs(readme): update readme & add contributing.md
2 parents f41bac6 + 5622693 commit cdf7b29

File tree

2 files changed

+109
-11
lines changed

2 files changed

+109
-11
lines changed

CONTRIBUTING.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing to nativescript-dev-typescript
2+
3+
:+1: First of all, thank you for taking the time to contribute! :+1:
4+
5+
Here are some guides on how to do that:
6+
7+
<!-- TOC depthFrom:2 -->
8+
9+
- [Code of Conduct](#code-of-conduct)
10+
- [Reporting Bugs](#reporting-bugs)
11+
- [Requesting Features](#requesting-features)
12+
- [Submitting a PR](#submitting-a-pr)
13+
- [Where to Start](#where-to-start)
14+
15+
<!-- /TOC -->
16+
17+
## Code of Conduct
18+
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).
19+
20+
21+
## Reporting Bugs
22+
23+
1. Always update to the most recent master release; the bug may already be resolved.
24+
2. Search for similar issues in the issues list for this repo; it may already be an identified problem.
25+
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).
26+
27+
## Requesting Features
28+
29+
1. Use Github Issues to submit feature requests.
30+
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.
31+
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.
32+
33+
## Submitting a PR
34+
35+
Before you begin:
36+
* Read and sign the [NativeScript Contribution License Agreement](http://www.nativescript.org/cla).
37+
* Make sure there is an issue for the bug or feature you will be working on.
38+
39+
Following these steps is the best way to get you code included in the project:
40+
41+
1. Fork and clone the nativescript-dev-typescript repo:
42+
```bash
43+
git clone https://github.com/<your-git-username>/nativescript-dev-typescript.git
44+
# Navigate to the newly cloned directory
45+
cd nativescript-dev-typescript
46+
# Add an "upstream" remote pointing to the original {N} repo.
47+
git remote add upstream https://github.com/NativeScript/nativescript-dev-typescript.git
48+
```
49+
50+
2. Set up the project:
51+
52+
```bash
53+
# In the repo root
54+
npm install --ignore-scripts
55+
```
56+
57+
3. Create a branch for your PR
58+
```bash
59+
git checkout -b <my-fix-branch> master
60+
```
61+
62+
4. The fun part! Make your code changes. Make sure you:
63+
- Follow the [NativeScript code conventions guide](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md).
64+
- Follow the [Angular Commit message guidelines](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w).
65+
66+
5. Before you submit your PR:
67+
- Rebase your changes to the latest master: `git pull --rebase upstream master`.
68+
- Ensure your changes pass tslint validation. (run `npm run tslint` in the root of the repo).
69+
70+
6. Push your fork. If you have rebased you might have to use force-push your branch:
71+
```
72+
git push origin <my-fix-branch> --force
73+
```
74+
75+
7. [Submit your pull request](https://github.com/NativeScript/nativescript-dev-typescript/compare). Please, fill in the Pull Request template - it will help us better understand the PR and increase the chances of it getting merged quickly.
76+
77+
It's our turn from there on! We will review the PR and discuss changes you might have to make before merging it! Thanks!
78+
79+
80+
## Where to Start
81+
82+
If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-dev-typescript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).

README.md

+27-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
1-
TypeScript support for NativeScript projects
2-
=======================================
1+
# NativeScript TypeScript
2+
3+
A package providing TypeScript support for NativeScript.
4+
5+
[NativeScript](https://www.nativescript.org/) is a framework which enables developers to write truly native mobile applications for Android and iOS using JavaScript and CSS. [Angular](https://angular.io/) is one of the most popular open source JavaScript frameworks for application development. We [worked closely with developers at Google](http://angularjs.blogspot.bg/2015/12/building-mobile-apps-with-angular-2-and.html) to make Angular in NativeScript a reality. The result is a software architecture that allows you to build mobile apps using the same framework—and in some cases the same code—that you use to build Angular web apps, with the performance you’d expect from native code. [Read more about building truly native mobile apps with NativeScript and Angular](https://docs.nativescript.org/tutorial/ng-chapter-0).
6+
7+
## How to use in NativeScript projects
38

4-
# How to use
5-
----------
69
```
710
$ npm install -D nativescript-dev-typescript
811
```
912

10-
The above command installs this module and installs the necessary hooks. TypeScript compilation happens when the project is prepared for build. A file named `tsconfig.json` that specifies compilation options will be created in the project folder and should be committed to source control.
13+
The above command adds `nativescript-dev-typescript` package as dev dependency and installs the necessary hooks. TypeScript compilation happens when the project is prepared for build. A file named `tsconfig.json` that specifies compilation options will be created in the project folder and should be committed to source control. [Read more about tsconfig.json options](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html).
1114

12-
# Note for plugins
13-
----------
14-
```
15-
$ npm install -D nativescript-dev-typescript@libs
16-
```
15+
## How it works
16+
17+
When the plugin installed what it will do out of the box is to add
18+
- `tsconfig.json` file to the project (if it doesn't exist),
19+
- `typescript` as dev dependency
20+
- `before-prepare` hook which takes care to transpile all files before preparing your project
21+
- `before-watch` hook to start the typescript watcher and transpile on every typescript change during project livesync
22+
- `after-watch` hook to stop the typescript watcher after the livesync is stopped
23+
24+
## How to use in NativeScript plugins
25+
26+
This package is not meant to be used in plugins. It's applicable for NativeScript projects only.
27+
28+
## Contribute
29+
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-dev-typescript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
1730

18-
When developing NativeScript plugins, you should install the 'libs' tag of the nativescript-dev-typescript plugin. This will skip adding 'paths' mappings for 'tns-core-modules' in the 'tsconfig.json', because of this Angular compiler [issue](https://github.com/angular/angular-cli/issues/5618).
31+
## Get Help
32+
Please, use [github issues](https://github.com/NativeScript/nativescript-dev-typescript/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-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).
33+
34+
![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-dev-typescript?pixel)

0 commit comments

Comments
 (0)