/* * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace HackStudio { class ProjectConfig { public: static ErrorOr> try_load_project_config(DeprecatedString path); static NonnullOwnPtr create_empty(); ProjectConfig(JsonObject); Optional build_command() const { return read_key("build_command"); } Optional run_command() const { return read_key("run_command"); } private: Optional read_key(DeprecatedString key_name) const; JsonObject m_config; }; }