[x] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
The hooks service is initialized and caches the hooksDirectories, however in some cases this might be an empty array (ie. when creating a new project, and the service is initialized before the project files exist yet).
What is the new behavior?
We only cache when there's items in the hooksDirectories (since this means the projectDir was defined)
closes https://github.com/NativeScript/nativescript-app-templates/pull/227
PR Checklist
What is the current behavior?
The hooks service is initialized and caches the hooksDirectories, however in some cases this might be an empty array (ie. when creating a new project, and the service is initialized before the project files exist yet).
What is the new behavior?
We only cache when there's items in the
hooksDirectories
(since this means the projectDir was defined)Fixes/Implements/Closes #[Issue Number].