customrealms / cli

Command line tools for creating and compiling JavaScript Minecraft plugins.
https://customrealms.io
MIT License
7 stars 3 forks source link

Add includes to Jar file #3

Open AL1L opened 2 years ago

AL1L commented 2 years ago

I have a request to add something to @customrealms/cli so this feature would work purfectly. Add something like configs argument.

{
  "name": "example-plugin",
   "version": "1.0.0",
   "description":  "",
   "configs": { 
       "config": "./configs/config.yml", 
       "messages": "./configs/messages.yml", 
       "data": "./configs/data.yml" 
  }
}

We need it so we could create configs and could add default creata form, it should be stored where plugin.yml is stored. Otherwise it will just not work!

Originally posted by @nedaras in https://github.com/customrealms/bukkit-runtime/pull/9#issue-1114236444

RE: For your cli suggestion, I think it would be beneficial to do something like that for future options too, so we should do something like

{
  "name": "example-plugin",
  "version": "1.0.0",
  "description": "",
  "customrealms": {
    "includes": {
      "/": ["./configs/*.yml"]
    }
  }
}

The nesting under "customrealms" is per the CommonJS standard and to not conflict with other packages or future features. And, it's just my initial thought, but having an includes property with a map of dirs relative to the root of the jar to include files into using globs. If that makes sense

Originally posted by @AL1L in https://github.com/customrealms/bukkit-runtime/issues/9#issuecomment-1022615354

andriemc commented 2 years ago

I would really like to see this be added.

Pedromdsn commented 1 year ago

Up

connerdouglass commented 2 weeks ago

This makes sense, and we will add it. We need to refine the design of this, as well as https://github.com/customrealms/bukkit-runtime/pull/9#issuecomment-1022615354, but in general I think embedding resource files needs to be part of the CustomRealms development pipeline.