mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-06-18 20:08:32 -06:00
PR-057563: updating package and removing bin command from package json on npx.
This commit is contained in:
@ -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);
|
Reference in New Issue
Block a user