/* This file acts as configuration for your templates. Sometimes it might be useful to create all necessary files upfront, instead of bloating the build script with one-time code. Here you can declare what files and directories should be created at project initialization. This file gets consumed at compile time, hence the anonymous procedure here. It also allows you to shift some verbosity to distinct constants or variables. You could even do more sophisticated things, as long it returns the `Rules` struct, defined in `src/main.jai`. */ () -> Rules { // You can even delcare the exact file contents. // For example the `.gitignore` file: gitignore :: #string STR_END # Jai .build /bin STR_END; main_jai :: #string STR_END #import "Basic"; main :: () { log("Hello, Sailor!"); } STR_END; return .{ // This is how you would call the template via arguments. // In this case: `jinit -t min` arg_name = "min", // Some description, could be also a empty string. description = "Minimal template", // The relative or absolute filepath to your template. // This allows you to keep your templates where you want. template = "templates/minimal/template.jai", // Which directories should be created. It won't create parents // automatically. They must be created first like this: // `.[ "test", "test/foo", "test/foo/bar" ]` dirs_in_workplace = .[ "src" ], // Which files should be created. And you can declare the content, too. files = .[ .{ ".gitignore", gitignore }, .{ "src/main.jai", main_jai }, .{ "README.md", "" }, ], // You could specify the exact file name for the build file here. // But you can also omit it and it will fall back to the default name. //build_file_name = "build.jai", }; }();