transloco
transloco copied to clipboard
fix(schematics): set current directory as default project name
- defaultProject was removed from the cli in angular 14
- this sets current working directory as default if --project argument is not specified
as recommended here : https://github.com/angular/angular-cli/issues/23470#issuecomment-1172240384
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/ngneat/transloco/blob/master/CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
What is the current behavior?
When using the ng add @ngneat/transloco
schematics with a newly created angular 14 project, it fails with the following error :
Cannot read properties of undefined (reading 'projectType')
Issue Number: #580
What is the new behavior?
The command without --project
argument won't fail, and project arg is pre-filled with root directory name.
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
n/a