Working package ignore

This commit is contained in:
2026-06-11 19:34:37 +02:00
parent 74d53fff97
commit a5a3d6566b
2 changed files with 18 additions and 20 deletions
+7 -4
View File
@@ -13,7 +13,7 @@ use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub struct MistConfig {
packages Vec<PathBuf>,
pub packages Vec<PathBuf>,
}
impl MistConfig {
pub fn is_package(*self, path *Path) bool {
@@ -46,10 +46,11 @@ pub fn transpile() PathBuf {
*pkg = src.join(&*pkg);
}
let master = modules::master_package(
let master = modules::Module::new(
config.packages.get(0)
.unwrap_or_else(fn() -> panic!("Mist.toml packages must contain at least one element, eg, 'src/main.mist'"))
.to_path_buf()
.to_path_buf(),
&config
);
master.transpile(&out, &config);
@@ -84,7 +85,9 @@ impl modules::Module {
let mut output = String::new();
for (child : &self.children) {
output.push_str(&child.transpile(&dir, config));
if (!config.is_package(&child.path)) {
output.push_str(&child.transpile(&dir, config));
}
}
if (self.path.is_dir()) {