File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,12 @@ export const generateSite = async () => {
39
39
exec ( "npm run export" ) ;
40
40
mkdir ( "-p" , "status-page/__sapper__/export" ) ;
41
41
cp ( "-r" , "__sapper__/export/*" , "status-page/__sapper__/export" ) ;
42
+ let assetsExists = false ;
42
43
try {
43
- console . log ( "../assets" , ( await stat ( "../assets" ) ) . size ) ;
44
- console . log ( "../../assets" , ( await stat ( "../../assets" ) ) . size ) ;
45
- console . log ( "../../../assets" , ( await stat ( "../../../assets" ) ) . size ) ;
46
- // cp("-r", "../assets/*", "status-page/__sapper__/export");
44
+ assetsExists = ( await stat ( "../assets" ) ) . size > 0 ;
47
45
} catch ( error ) {
48
- // Ignore errors if unable to find directory
46
+ // Ignore errors if assets folder doesn't exist
49
47
}
48
+ if ( assetsExists ) cp ( "-r" , "../assets/*" , "status-page/__sapper__/export" ) ;
50
49
cd ( "../.." ) ;
51
50
} ;
You can’t perform that action at this time.
0 commit comments