morko / haxroomie

Haxroomie is an API and CLI to run headless HaxBall rooms without GUI.
17 stars 14 forks source link

Make it possible to add repository from filesystem #48

Closed morko closed 5 years ago

morko commented 5 years ago

In haxroomie CLI config the user should be able to load a repository like this:

repositories: [
  {
    type: 'local',
    path: '/path/to/local/repository'
  }
]
morko commented 5 years ago

This makes hot loading repositories harder.

morko commented 5 years ago

7a02afb adds support for this the local repository gets serialized to

  {
    type: 'local',
    path: '/path/to/local/repository',
    plugins: {
      'pluginName1': 'contents',
      'pluginName2: 'contents'
    }
  }

Its a bit stupid because it will think that everything under that path + /src with *.js filename ending is a plugin and then it will try find the name for that plugin in the file contents. If it doesnt find a name then plugin name is the path to that plugin.

Now HHM needs to support this repository type.

morko commented 5 years ago

Commit d39fee1 adds support for defining the subpath and filename suffix for the repositories plugins so the repository object in the haxroomie config can now be

  {
    type: 'local',
    path: '/path/to/local/repository',
    subpath: '/src',
    suffix: '.js'
  }

subpath and suffix are optional and the default values are same than in the example above.

morko commented 5 years ago

Should be supported now in https://github.com/saviola777/haxball-headless-manager/commit/0a579515b1d885caa1308cb3d9d9b8d2d845cbac