Skip to content

A simple CLI to create a folder structure over given text file

License

Notifications You must be signed in to change notification settings

ramonmoraes/structure-generator

Repository files navigation

Structure-Generator

A simple CLI to create a folder structure over given text file

Build Status

Installing

$ npm install -g structure-generator

How to use

$ structure-generator template-file-path

Example

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

Template file rules

  1. To be considered a file, it must have a .(dot) in it's name
  2. 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)
  3. The siblings from the outter folder, will not generate anything (to be fixed)

Contributing

  1. Fork this project
  2. Make the changes on your forked repository
  3. Make sure the test are passing, running:
npm test
  1. Make a pull request ;D

About

A simple CLI to create a folder structure over given text file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published