View on GitHub

vscode-didact

Didact Gives Your Readme Superpowers!

Didact Folder/File Scaffolding

Didact offers a way to model a folder and file structure by defining the structure in a special JSON file. It can describe a nested folder/file arrangement that is then modeled in the user workspace where specified.

These files can be used/accessed in one of two ways:

See Project JSON Structure below for details about how to construct the project JSON file.

Project JSON Structure

The Project JSON file structure is simply a collection of named folders and files, as follows:

    "folders": [
    {
       "name":"simpleGroovyProject",
       "folders": [
         {
             "name":"src",
             "files": [
                 {
                     "name":"simple.groovy",
                     "content":"from('timer:groovy?period=1s')\n\t.routeId('groovy')\n\t.setBody()\n\t.simple('Hello Camel K from ${routeId}')\n\t.to('log:info?showAll=false')\n",
		     "open" : true
                 },
                 {
                     "name":"mycopied.file",
                     "copy":"file-in-same-directory-as-my-project-json-that-I-want-the-contents-of.txt"
                 }
             ]
           }
     ]
    }
 ]
}

Files can either have their content specified in the project JSON file itself (i.e. content: "myfilecontent") or copy content from a file in the directory at the same level as the project JSON file (i.e. copy: myfile.txt).

By specifying "open" : true for a particular file, you can tag it to be opened automatically when the folders and files are created. If the flag is absent, it is assumed to be false and will not be opened.