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 the icons and splash screens (which you see when the app is loading) in app
. You can edit these files when you want to publish an app. The npm install
command installs the dependencies that NativeScript needs. These dependencies were added to package...