File tree Expand file tree Collapse file tree
libs/scully/src/lib/systemPlugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,18 +4,23 @@ import { HandledRoute } from '../routerPlugins/addOptionalRoutesPlugin';
44import { scullyConfig } from '../utils/config' ;
55import { createFolderFor } from '../utils/createFolderFor' ;
66import { log , logError , yellow } from '../utils/log' ;
7+ import { watch } from '../utils/cli-options' ;
78
89const routesFileName = '/assets/scully-routes.json' ;
910
1011export async function storeRoutes ( routes : HandledRoute [ ] ) {
1112 const files = [
12- /** in the angular source folder */
13- join ( scullyConfig . homeFolder , scullyConfig . sourceRoot , routesFileName ) ,
1413 /** in the scully outfolder */
1514 join ( scullyConfig . outDir , routesFileName ) ,
1615 /** in the angular dist folder */
1716 join ( scullyConfig . homeFolder , scullyConfig . distFolder , routesFileName )
1817 ] ;
18+ if ( ! watch ) {
19+ files . push (
20+ /** in the angular source folder */
21+ join ( scullyConfig . homeFolder , scullyConfig . sourceRoot , routesFileName )
22+ ) ;
23+ }
1924 try {
2025 const jsonResult = JSON . stringify (
2126 routes . map ( r => ( { route : r . route || '/' , ...r . data } ) )
You can’t perform that action at this time.
0 commit comments