std.Build: improve documentation for UpdateSourceFiles step

This commit is contained in:
Andrew Kelley
2026-05-19 15:41:58 -07:00
parent 2c70c40499
commit 58f8dcd15e
2 changed files with 10 additions and 5 deletions
+10
View File
@@ -966,6 +966,16 @@ pub fn addWriteFiles(b: *Build) *Step.WriteFile {
return Step.WriteFile.create(b);
}
/// Creates a step for writing data to paths relative to the build root,
/// mutating the project's source files.
///
/// This build step was designed not to be used during the normal build
/// process, but rather as a utility run by a developer with intention to
/// update source files, which will then be committed to version control.
///
/// Example use cases:
/// * precompiling assets which are tracked by version control
/// * snapshot testing
pub fn addUpdateSourceFiles(b: *Build) *Step.UpdateSourceFiles {
return Step.UpdateSourceFiles.create(b);
}
-5
View File
@@ -1,8 +1,3 @@
//! Writes data to paths relative to the package root, effectively mutating the
//! package's source files. Be careful with the latter functionality; it should
//! not be used during the normal build process, but as a utility run by a
//! developer with intention to update source files, which will then be
//! committed to version control.
const UpdateSourceFiles = @This();
const std = @import("std");