O'Reilly logo

TypeScript Blueprints by Ivo Gabe de Wolff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the project structure

In the previous chapters, we wrote our TypeScript sources in the lib directory. The static or dist directory contained the compiled sources. However, in this chapter, we have to make a different structure since NativeScript has some requirements on it. NativeScript requires that the compiled sources are located in the app directory and it uses the lib directory for plugins, so we cannot use that directory for our TypeScript sources. Instead, we will use the src directory.

NativeScript can automatically create a basic project structure. By running the following commands, a minimal project will be created:

tns init
npm install

The first command creates the package.json file and the app directory. NativeScript stores ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required