Skip to content

docs(readme): update readme & add contributing.md #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Contributing to nativescript-dev-typescript

:+1: First of all, thank you for taking the time to contribute! :+1:

Here are some guides on how to do that:

<!-- TOC depthFrom:2 -->

- [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)

<!-- /TOC -->

## 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:
* Read and sign the [NativeScript Contribution License Agreement](http://www.nativescript.org/cla).
* 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 you code included in the project:

1. Fork and clone the nativescript-dev-typescript repo:
```bash
git clone https://github.com/<your-git-username>/nativescript-dev-typescript.git
# Navigate to the newly cloned directory
cd nativescript-dev-typescript
# Add an "upstream" remote pointing to the original {N} repo.
git remote add upstream https://github.com/NativeScript/nativescript-dev-typescript.git
```

2. Set up the project:

```bash
# In the repo root
npm install --ignore-scripts
```

3. Create a branch for your PR
```bash
git checkout -b <my-fix-branch> master
```

4. The fun part! Make your code changes. Make sure you:
- Follow the [NativeScript code conventions guide](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md).
- Follow the [Angular Commit message guidelines](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w).

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 root of the repo).

6. Push your fork. If you have rebased you might have to use force-push your branch:
```
git push origin <my-fix-branch> --force
```

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.

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-dev-typescript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
TypeScript support for NativeScript projects
=======================================
# NativeScript TypeScript

A package providing TypeScript support for NativeScript.

[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).

## How to use in NativeScript projects

# How to use
----------
```
$ npm install -D nativescript-dev-typescript
```

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.
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).

# Note for plugins
----------
```
$ npm install -D nativescript-dev-typescript@libs
```
## How it works

When the plugin installed what it will do out of the box is to add
- `tsconfig.json` file to the project (if it doesn't exist),
- `typescript` as dev dependency
- `before-prepare` hook which takes care to transpile all files before preparing your project
- `before-watch` hook to start the typescript watcher and transpile on every typescript change during project livesync
- `after-watch` hook to stop the typescript watcher after the livesync is stopped

## How to use in NativeScript plugins

This package is not meant to be used in plugins. It's applicable for NativeScript projects only.

## 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-dev-typescript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).

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).
## Get Help
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).

![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-dev-typescript?pixel)