MysteryBlokHed / databind

Expand the functionality of Minecraft Datapacks.
https://databind.rtfd.io/en/stable
GNU General Public License v3.0
4 stars 0 forks source link

Improved project creation/building #22

Closed MysteryBlokHed closed 3 years ago

MysteryBlokHed commented 3 years ago

Currently there is a databind create command that can be used to make a project, but it could be easier to build. The current system that the CLI uses to build is just to pass a path, for example databind ./my_project. There are options for output, configuration, etc., but it would be nice to be able to just run databind and have it build based on the configuration file.

The generation of the configuration file should be able to use the default values for the Settings struct, but the output directory should be specified instead of left blank. Building by passing a path to the CLI should still be allowed, but it should also look for a databind.toml file in the target directory. Running databind should work no matter the current directory of the command line. For example, it should work whether you're in the project's root, in the data folder, or in a functions folder.

The folder structure from databind create could also use some improvement. It should look more like this:

project_name
│   databind.toml
└───src
    │   pack.mcmeta
    └───data
        └───project_name
            └───functions
                    main.databind

This way, the generated folder will also contain the output folder instead of generating a new one.