mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
src folder for package can have subfolders
Adding to src folder, subfolders that contain v files. That allows a better organization of v files inside a packages inside src folder.
This commit is contained in:
parent
6756d28595
commit
77e14f6e68
@ -346,6 +346,12 @@ pub fn (b Builder) v_files_from_dir(dir string) []string {
|
||||
println('v_files_from_dir ("${src_path}") (/src/)')
|
||||
}
|
||||
files = os.ls(src_path) or { panic(err) }
|
||||
src_path_offset := src_path.split('/').len
|
||||
for file in os.walk_ext(src_path, '.v').map(it.split('/')#[src_path_offset..].join('/')) {
|
||||
if !files.contains(file) {
|
||||
files << file
|
||||
}
|
||||
}
|
||||
return b.pref.should_compile_filtered_files(src_path, files)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user