Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/hdeshev/nativescript-ts-hello

A sample NativeScript project using TypeScript
https://github.com/hdeshev/nativescript-ts-hello

Last synced: 3 months ago
JSON representation

A sample NativeScript project using TypeScript

Lists

README

        

# NativeScript + TypeScript

This is a sample project wrapping the `tns` commands in a Grunt script that compiles the TypeScript code and assembles the correct `app` folder structure.

# How it works?

* We keep everything below `./src`. **DO NOT PUT ANYTHING IMPORTANT IN `./app`**
* The TypeScript compiler puts transpiled `.js` files in `./app'
* A Grunt task updates all app assets and the `tns_modules` folder too.

# Setting it up

```sh
$ npm install
$ tns platform add android
$ tns platform add ios
$ grunt app-full.
```

When done, run the emulator (see below).

# Development workflow

* Edit some files.
* Start the emulator using: `grunt run-android --avd ` or `grunt run-ios --device `
* Hit Ctrl-C when done.

# Upgrading to a newer NativeScript version

* Update your platforms.
* Update your `src/tns_modules` folder with the latest version of the module code.
* Remove the 1.5.2 `*.d.ts` files below `src/typings/nativescript/1.5.2` and add the new type declarations in a similarly named folder.
* Update `*.d.ts` path references to the new typings folder in `src/dependencies.d.ts`