@@ -91,19 +91,22 @@ function _cleanPhoenixProGitFolder() {
9191
9292function _deletePhoenixProSourceFolder ( ) {
9393 return new Promise ( ( resolve ) => {
94- // todo we cant do this yet lots of issues happening due to missing files in dist test mainly
95- // which i also suspect are actual issues
96- // const phoenixProFolders = [
97- // 'dist/extensionsIntegrated/phoenix-pro',
98- // 'dist-test/src/extensionsIntegrated/phoenix-pro'
99- // ];
100- //
101- // for (const folder of phoenixProFolders) {
102- // if (fs.existsSync(folder)) {
103- // fs.rmSync(folder, { recursive: true, force: true });
104- // console.log(`Deleted phoenix-pro source folder: ${folder}`);
105- // }
106- // }
94+ const phoenixProFolders = [
95+ // we only delete the source folder from the release build artifact and not the test artifact. why below?
96+ 'dist/extensionsIntegrated/phoenix-pro'
97+ // 'dist-test/src/extensionsIntegrated/phoenix-pro' // ideally we should delete this too so that the tests
98+ // test exactly the release build artifact, but the spec runner requires on these files during test start
99+ // and i wasnt able to isolate them. so instead wehat we do now is that we have an additional test in prod
100+ // that checks that the phoenix-pro source folder is not loaded in prod and loaded only from the inlines
101+ // brackets-min file.
102+ ] ;
103+
104+ for ( const folder of phoenixProFolders ) {
105+ if ( fs . existsSync ( folder ) ) {
106+ fs . rmSync ( folder , { recursive : true , force : true } ) ;
107+ console . log ( `Deleted phoenix-pro source folder: ${ folder } ` ) ;
108+ }
109+ }
107110 resolve ( ) ;
108111 } ) ;
109112}
0 commit comments