PR-057563: updating package and removing bin command from package json on npx.

This commit is contained in:
2022-08-03 14:56:13 +00:00
parent 9fc8014012
commit bbd1f1e606
3 changed files with 24 additions and 20 deletions

View File

@ -19,6 +19,7 @@ const cleanGitHistoryCommand = `cd ${repoName} && rm -rf .git && git init && git
const cleanGitHistoryCommandWindows = `cd ${repoName} && rmdir .git /s /q && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
const deleteFoldersCommand = `cd ${repoName} && rm -rf .github && rm -rf bin`
const deleteFoldersCommandWindows = `cd ${repoName} && rmdir .github /s /q && rmdir bin /s /q`
const deleteBinCommand = `cd ${repoName} && sed -i 's+"bin": "./bin/cli.js",++g`
console.log(`Cloning the repository with name ${repoName}`);
const checkedOut = runCommand(gitCheckoutCommand);
@ -38,4 +39,7 @@ console.log('Create a .env file with ENV=development(defauld: production), PORT=
console.log(`Then you can run: npm start:dev`);
const deleteFolders = isWin ? runCommand(deleteFoldersCommandWindows) : runCommand(deleteFoldersCommand);
if(!deleteFolders) process.exit(-1);
if(!deleteFolders) process.exit(-1);
const deleteBin = runCommand(deleteBinCommand);
if(!deleteBin) process.exit(-1);