Folder structures

Hi!

I noticed that in my recent projects I’ve spent a lot of work setting up the project structure (mainly arranging folders/directories - boring stuff but someone had to make it).
And the way I usually documented the work done is a text file, like this:

# Source files
|- src
   |- modules
      |- auth # Auth module
         |- api
         |- domain
         |- services
         |- infrastructure
      |- core
         |- a few # Folder name with space!
         |- other
         |- folders
# Documentation
|- doc
   |- modules
      |- foo
      |- bar

This looks like a pretty good example for a DSL, but I always did it manually :frowning:

Do you know any tool that could the below?

  • create folders from a file containing the structure
  • build the structure file from existing folder structure

Would be super awesome if it could also:

  • initialize java/dotnet/angular/react/whatever projects there
  • create files from some templates, like class files
  • have an editor, or plugin a for vs code for easier editing/refactoring

If not maybe I will create one - should be simple enough for a novice language engineer like me :smiley:

Thanks :slight_smile:

1 Like

Hi: Take a look to https://yeoman.io
I think will cover well some of your requirements.

1 Like

Definitely something up rascal’s alley. You’d write a grammar and use it’s standard IO module to give it semantics by writing a small interpreter that uses concrete pattern matching. Templates are built-in too. Http://www.rascal-mpl.org

1 Like

Take a look at GitHub - cookiecutter/cookiecutter: A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.