advfe-unified-workspace

Advanced Front End: Removing unnecessary files

Just a little housekeeping to keep things well organised.


As the repository for the Django DRF code will now house the entire application, including the React project. We must remove the React git folder, .gitignore file and README from the frontend folder. If you want to copy any contents of your README file from the React project to your DRF README, you can do this now. Alternatively, you can access it from the original repository later to update your unified workspace documentation.

Removing git and README files from the frontend folder

  1. In the terminal window, change directory to the frontend folder with the following command

    cd frontend

    a terminal showing 'cd frontend' and the resulting working directory

  2. Enter the following command to remove the .git folder, .gitignore file and README.md from the frontend folder

    rm -rf .git .gitignore README.md

    a terminal showing the command rm -rf .git .gitignore README.md

    Running this command from your workspace in the wrong working directory is dangerous. Check you are in the frontend directory by using the pwd command.

  3. Install the npm packages required for developing with React using the following command

    npm install

    This install will take some time, the terminal may appear to freeze for a few minutes. Once it does start to show activity you can ignore any deprecated warnings, these are extremely common and expected with npm installs.

  4. Move back to the root directory of your project with the following command

    cd ..

    a terminal showing the cd .. command the resulting working directory

    Ensure that your git commits are always made in the root folder, and not from the frontend folder when working in the terminal running the React server.

This would be a good point to commit your changes so far.

Up Next

We need to make some changes to our React project for the development environment.