Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Major Additions in NativeScript 1.5

Major Additions in NativeScript 1.5

NativeScript 1.5 has been released, with major additions including TypeScript support and unit testing for NativeScript projects.

In the blog post Six major additions in NativeScript 1.5 release to skyrocket your developer experience, Valio Stoychev of Telerik says that the release "marks a major milestone" for NativeScript developers.

One of the biggest developments in the 1.5 release is the support for TypeScript, allowing NativeScript users to develop their projects in TypeScript, without the need for TypeScript compilers. Stocyhev says:

Building and running your app with the CLI commands will automatically compile the TS files and deploy the output on the device. All of this is happens transparently for you, so all you need to do is write your TS code.

NativeScript 1.5 also brings many improvements to the core framework -- including the fixing of various bugs. On the blog, Stoychev lists a total of "69 issues in the JavaScript modules, 86 issues in the CLI, 9 issues in the Android runtime and 25 issues in the iOS runtime" resolved.

Also improved in 1.5 is NativeScript's refactored LiveSync. The challenge to make LiveSync both smarter and faster began in October with contributor Todor Todev and the issue Smarter LiveSync #1007 that aimed to:

  • Be smarter about the changes that are being made to the files and do the following for:
    • CSS - just update the file and reload dynamically the new CSS in the live tree of visual objects. This requires changes in the common platform modules.
    • XML - compute a change diff gram and apply the change to the live visual tree.
    • JavaScript - enable LiveEdit similar to how V8 handles it internally.

The framework's hot reload functionality now immediately applies changes made to XML or CSS files on the running app.

Also new in 1.5 is the introduction of a way for users to unit test their NativeScript projects. Contributor Stefan Dragnev raised the issue with the idea that users would be able to "write tests on their dev machine and execute them on a device or emulator with no friction" and "be able to use a testing framework they're familiar with."

NativeScript's unit test runner is based on Karma, Google's open source testing tool, with adapters for popular frameworks like Jasmine, QUnit and Mocha.

A full changelog for NativeScript 1.5 is available to view here. NativeScript is open source and released under the Apache 2.0 license.

Rate this Article