IT기타

Bash 스크립트로 웹사이트 생성하는 파일 구조 생성. (해당 파일 및 디렉토리 구조를 생성)

emilyyoo 2024. 8. 18. 12:07
728x90

예시) 


# "project-root" 폴더 생성 및 이동
mkdir -p project-root && cd project-root

# backend 폴더와 그 하위 폴더/파일 생성
mkdir -p backend/{app,tests}
touch backend/app/{__init__.py,models.py,routes.py,schemas.py,services.py,utils.py}
touch backend/tests/{__init__.py,test_auth.py,test_business_card.py,test_mbti.py}
touch backend/{main.py,config.py,requirements.txt}

# frontend 폴더와 그 하위 폴더/파일 생성
mkdir -p frontend/{public,src/{assets,components,pages}}
touch frontend/public/index.html
touch frontend/src/components/{BusinessCardDesigner.js,MBTITest.js,Login.js,Register.js,Navbar.js}
touch frontend/src/pages/{Home.js,Dashboard.js,Profile.js}
touch frontend/src/{App.js,index.js,styles.css}
touch frontend/{package.json,webpack.config.js}

# docker-compose.yml 파일 생성
touch docker-compose.yml

echo "Project structure created successfully."

728x90