Closed geromegrignon closed 4 years ago
@geromegrignon this is not a bug, but more of an undocumented feature.
From now on, Scully only scans the angular app once and saves the result.
When you add routes in the angular app, you need to rescan it, by adding the --scanRoutes
or --sr
option.
This is done because the route discover takes a relatively long time, especially in larger apps. Adding routes is not something that happens often, so it makes sense to make the scan opt-oin
I will update the docs, and the messages in Scully to make this more apparent.
Thanks for the feedback.
🐞 Bug report
Description
Since the last version on npm, there is a regression on the generation of the scully.routes.json. Once created, the file isn't updated anymore with
npm run scully
if new routes are added. It's still correctly updated with new blog posts if the blog module was created before launchingnpm run scully
for the first time.🔬 Minimal Reproduction
ng g m home --route --module app.module.ts
ng add @scullyio/init
ng build
npm run scully
ng g m about --route --about app.module.ts
ng build
npm run scully
The about module isn't included in the scully.routes.json file and there is no log about the generation of a rendered file for
about
.Another example :
Logs on
npm run scully
:scully-routes.json file :
AppRoutingModule :
The blog and dashboard module added after the first
npm run scully
iteration aren't added on consecutivenpm run scully
;💻Your Environment
Angular Version:
Scully Version: