On the last section, we discussed the prerequisites of creating an Aurelia app such as installing the NodeJS, NPM, and downloading the Git client. (This is also thoroughly discussed in our Angular 2 tutorial. And since both Aurelia and Angular have the same prerequisites, it may be worthwhile for you to review these lectures here before proceeding.)
Now that Aurelia is successfully installed, we may now start our new application. In a command line, type au new.A number of options will appear. If you are not sure what you want, you can select one of the default templates and follow the prompt or you may choose to customize. Once selected, Aurelia will automatically create all of the project’s dependencies.
Now that the application is created, let us guide you throughout the folder structure of an Aurelia app to have a better understanding of core concepts behind Aurelia’s framework.
- package.json is a documentation about npm packages currently installed. It also delivers versions of those packages and creates simple ways to add, delete, change version; or when the app needs to be shared between developers, this automatically installs all packages.
- index.html is the default page of the app similar to most of the HTML apps. It is the part where scripts and stylesheets are loaded.
- config.js is the Aurelia loader configuration file.
- jspm_packages is a list of the SystemJS loaded modules.
- styles is default styling directory. This directory can always be adjusted.
- src folder is a place where you will be focusing most of your development time. This is where HTML and js files are found.