Skip to content

Commit

Permalink
fix(CRA-e2e): remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Aug 18, 2021
1 parent 932a709 commit 3736a50
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions scripts/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,37 +168,6 @@ class Test {
}
}

getPackages(packagesPath: string) {
const packagePathsByName: { [key: string]: string } = {};

fs.readdirSync(packagesPath).forEach(name => {
const packagePath = path.join(packagesPath, name);
const packageJson = path.join(packagePath, 'package.json');
if (fs.existsSync(packageJson)) {
packagePathsByName[name] = packagePath;
}
});

return packagePathsByName;
}

packReactScripts(packagesPath: string) {
const scriptsFileName = Test.execPipe(
'npm pack',
path.join(packagesPath, 'react-scripts')
)
.toString()
.trim();

const scriptsPath = path.join(
packagesPath,
'react-scripts',
scriptsFileName
);

return scriptsPath;
}

runCRA(templatePath: string, scriptsPath: string) {
Test.info('Run create-react-app to generate project ...');
Test.exec(`rm -fr ${this.appPath}`);
Expand Down

0 comments on commit 3736a50

Please sign in to comment.