Skip to content

Architecture and usage of angular2 seed

Minko Gechev edited this page Oct 10, 2016 · 4 revisions

The angular-seed provides you the base for your applications. It deals with a lot of boilerplates such as, the repetitive across projects, configuration of your build process.

Application logic

The entire application logic should be placed inside of the src directory. Once you clone the seed project, you'll find out that it includes a basic application which shows how the individual code units could be wired together. In order to add your application specific logic/layout you can modify the existing components and/or create new ones.

Build

Note that in case you modify tasks/config/utils which belong to any seed directory will lead to harder update to newer versions of the project.

One of the greatest benefits of the angular-seed is its modularity. The project allows you to create your application and once you find out that you want to update its base (i.e. the seed you have used), you can do that without much effort.

Config

The project defines a base configuration inside: tools/config/seed.config.ts. The config can be easily overridden in: tools/config/project.config.ts.

Tasks

Same applies for tasks. All the project leaf tasks (i.e. tasks which are not composition of other tasks) that the seed defines are inside: tools/tasks/seed. In case you want to override any of them or add new tasks you can do that in: tools/tasks/project. The new tasks will be automatically picked by the seed and will override existing tasks with the same file name and/or add new gulp tasks called the same way the file they are defined in is called.

Utils

The same applies for the tools/utils directory - you can define project-specific utility methods there.