feat(daemon): scaffold projects on request
This commit is contained in:
1 parent
2c6b60453a
commit
7945db9497
13 files changed
+365
-130
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Void::Build::Config {
|
||||
|
||||
struct ScaffoldOptions {
|
||||
std::filesystem::path target_dir;
|
||||
std::optional<std::string> name;
|
||||
bool library{false};
|
||||
bool with_toml{false};
|
||||
bool force{false}; // Overwrite an existing build.cpp
|
||||
};
|
||||
|
||||
struct ScaffoldReport {
|
||||
std::filesystem::path target_dir;
|
||||
std::string project_name;
|
||||
std::string identifier;
|
||||
std::vector<std::filesystem::path> written_files;
|
||||
};
|
||||
|
||||
// Writes a ready-to-build C++26 VBS project (build.cpp, include/src/tests sources, .gitignore,
|
||||
// and optionally vbs.deps.toml) into `options.target_dir`.
|
||||
// Fails explicitly when build.cpp exists and `force` is false.
|
||||
[[nodiscard]] Void::Result::Result<ScaffoldReport, Void::Result::Error>
|
||||
scaffold_project(const ScaffoldOptions &options);
|
||||
|
||||
} // namespace Void::Build::Config
|
||||
Reference in new issue
Block a user