4.0 Project detection
Aurelia projects often use a combination of technologies such as gulp, jspm, aurelia-cli and more. Monterey wants to know what technologies a project uses and what directory structure is used, so that it can use this information throughout the application. For example, when displaying the JSPM dependencies in a table, Monterey needs to know where the config.js file is located. Even though this config.js file is often in the root directory, this may not always be the case.
Monterey uses the plugin system (see chapter Plugin system) to execute project detection logic. As soon as a project gets created or added to Monterey, all plugins will be asked to provide information about this project. The evaluateProject callback of all plugins will be called.
For example, the JSPM plugin uses the evaluateProject callback to look for a config.js file, and if this file is found then it will add the path to config.js on the project object:
After all plugins have had the opportunity to provide information about a project, the detection phase has finished and is not happening again. This allows the detection logic to be more advanced, use more resources (disk I/O, CPU), knowing that this process only happens once.