Cloning Repositories

Learn how to programmatically clone repositories.

Creating the config file

Here it comes, a new dependency. This one is called shelljs, and it allows you to execute commands on the CLI, through your scripts.

You require it at the top of your script, as well as the colors package, the native path module, and a pre-made config.json file, containing URLs of the repositories you would like to clone.

Note: As mentioned earlier in the course, you will find a config.example.json in the working directory. This will need to be copied and created as config.json. The reasoning behind this is that some examples will have sensitive data, which you do not want to commit and push to a public repository. This is essential knowledge for when you will deal with the Email and SMS examples, later on in this course.

Get hands-on with 1200+ tech skills courses.