1.0.0 • Published 5 years ago

create-directories v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

make-directories 📓

Micro-library for easy directory creation.

Installation 📦

yarn add make-cirectories

Usage 💻 ☕️

const mkdir = require("create-directories"); 

const structure = {
    "books": {
        "fiction": {}
        "non-fiction": {}
    }, 
    "school": {
        "programming": {
            "notes": {}, 
            "examples": {}
        }, 
        "databases": {}, 
        "alorithms": {}
    }, 
    "other": {}
}

// creates directories in current directory 🐟
mkdir(structure); 
// creates directory in other root 🐠
mkdir(structure, "/path/to/other/root"); 

Will produce the following directory structure:

books
    fiction 
    non-fiction
school
    programming 
        notes 
        examples 
    databases
    algorithms
other