소스 검색

rename tauri_build_context to build_script_context

Chip Reed 2 년 전
부모
커밋
ec00d0437e
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      core/tauri-build/src/codegen/context.rs
  2. 1 1
      core/tauri/src/lib.rs
  3. 1 1
      examples/api/src-tauri/src/lib.rs

+ 2 - 2
core/tauri-build/src/codegen/context.rs

@@ -52,13 +52,13 @@ impl CodegenContext {
   ///
   /// **Note:** This path should be relative to the `OUT_DIR`.
   ///
-  /// Don't set this if you are using [`tauri::tauri_build_context!`] as that helper macro
+  /// Don't set this if you are using [`tauri::build_script_context!`] as that helper macro
   /// expects the default value. This option can be useful if you are not using the helper and
   /// instead using [`std::include!`] on the generated code yourself.
   ///
   /// Defaults to `tauri-build-context.rs`.
   ///
-  /// [`tauri::tauri_build_context!`]: https://docs.rs/tauri/latest/tauri/macro.tauri_build_context.html
+  /// [`tauri::build_script_context!`]: https://docs.rs/tauri/latest/tauri/macro.build_script_context.html
   #[must_use]
   pub fn out_file(mut self, filename: PathBuf) -> Self {
     self.out_file = filename;

+ 1 - 1
core/tauri/src/lib.rs

@@ -433,7 +433,7 @@ pub use tauri_macros::generate_context;
 ///
 /// [`tauri-build`]: https://docs.rs/tauri-build
 #[macro_export]
-macro_rules! tauri_build_context {
+macro_rules! build_script_context {
   () => {
     include!(concat!(env!("OUT_DIR"), "/tauri-build-context.rs"))
   };

+ 1 - 1
examples/api/src-tauri/src/lib.rs

@@ -123,7 +123,7 @@ pub fn run() {
       cmd::log_operation,
       cmd::perform_request,
     ])
-    .build(tauri::tauri_build_context!())
+    .build(tauri::build_script_context!())
     .expect("error while building tauri application");
 
   #[cfg(target_os = "macos")]