jcgertig / terminal-in-react-pseudo-file-system-plugin

Plugin to add a pseudo file system to terminal-in-react
MIT License
9 stars 4 forks source link

Default directories tree #2

Open Alex100dre opened 5 years ago

Alex100dre commented 5 years ago

First thank you for the plugin. 🙂

But I found it sad that we couldn't pass a defaultDirTree object as parameter to the configPlugin function. 🤔

Actually, it takes only pathSeporator parameter.

That would be great to be able to pass this kind of object :

{
  home: {
    name: 'home',
    type: 'dir',
    contents: {
      user: {
        name: 'user',
        type: 'dir',
        contents: {},
      },
      myFile: {
        name: 'myFile.txt',
        type: 'file',
        contents: 'Hello world'
      }
    },
  },
}
jcgertig commented 5 years ago

Hmm good suggestion