A simple CLI to create a folder structure over given text file
$ npm install -g structure-generator
$ structure-generator template-file-path
Consider this our project
src/
index.js
structure.md
Which structure.md
has this content
root/
file.txt
folder/
file.txt
Then, simple execute:
$ structure-generator structure.md src
This will generate the given structure in the structure.md
file, therefore our project will look like:
src/
root/
file.txt
folder/
file.txt
index.js
structure.md
- To be considered a file, it must have a
.(dot)
in it's name - A file to be considered "nested" must have more padding at left then it's "father", before any non-space characters The siblings from the outter folder, will not generate anything (to be fixed)
- The siblings from the outter folder, will not generate anything (to be fixed)
- Fork this project
- Make the changes on your forked repository
- Make sure the test are passing, running:
npm test
- Make a pull request ;D