👩💻 Join our community of thousands of amazing developers!
This is a simple NodeJS app that takes a source folder as input and generates a Bash script. The Bash script has all the files’ content and the folders’ structure in the source folder and it can recreate them when executed.Source code available here: https://github.com/alexadam/folders-to-scriptFirst step, iterate through all files in the source folder:const fs = require("fs")const path = require("path")const listFiles = (dirPath, result) => { files = fs.readdirSync(dirPath) result = result || [...