mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-10-31 10:03:18 +00:00 
			
		
		
		
	 09fa75f5ec
			
		
	
	
		09fa75f5ec
		
			
		
	
	
	
	
		
			
			* chore: remove crate * chore: use rust 1.81 * chore: remove build flag * fix: macos build error * chore: upgrade super_clipboard * chore: fix pb lint warning * chore: fix clippy --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
| [tasks.wasm_build]
 | |
| script_runner = "bash"
 | |
| script = [
 | |
|   """
 | |
|   #!/usr/bin/env bash
 | |
|   BASE_DIR=$(pwd)
 | |
|   crates=("lib-dispatch" "lib-infra" "flowy-notification" "flowy-date" "flowy-error" "collab-integrate" "flowy-document")
 | |
| 
 | |
|   # Iterate over each crate and build it
 | |
|   for crate in "${crates[@]}"; do
 | |
|     echo "🔥🔥🔥  Building $crate with wasm-pack..."
 | |
|     cd "$BASE_DIR/rust-lib/$crate" || { echo "Failed to enter directory $crate"; exit 1; }
 | |
| 
 | |
|     wasm-pack build || { echo "Build failed for $crate"; exit 1; }
 | |
|   done
 | |
|   """
 | |
| ]
 | |
| 
 | |
| 
 | |
| [tasks.web_clean]
 | |
| description = "Remove all the building artifacts"
 | |
| run_task = { name = [
 | |
|   "rust_lib_clean",
 | |
|   "rm_macro_build_cache",
 | |
|   "rm_rust_generated_files",
 | |
|   "rm_web_generated_protobuf_files",
 | |
|   "rm_web_generated_event_files",
 | |
|   "rm_pkg",
 | |
| ] }
 | |
| 
 | |
| [tasks.rm_web_generated_protobuf_files]
 | |
| private = true
 | |
| script = ["""
 | |
|   protobuf_file_paths = glob_array ${WEB_BACKEND_SERVICE_PATH}/models
 | |
|   if not array_is_empty ${protobuf_file_paths}
 | |
|     echo Remove generated protobuf files:
 | |
|     for path in ${protobuf_file_paths}
 | |
|         echo remove ${path}
 | |
|         rm -rf ${path}
 | |
|     end
 | |
|   end
 | |
|   """]
 | |
| script_runner = "@duckscript"
 | |
| 
 | |
| 
 | |
| 
 | |
| [tasks.rm_web_generated_event_files]
 | |
| private = true
 | |
| script = ["""
 | |
|   event_file_paths = glob_array ${WEB_BACKEND_SERVICE_PATH}/events
 | |
|   if not array_is_empty ${event_file_paths}
 | |
|     echo Remove generated protobuf files:
 | |
|     for path in ${event_file_paths}
 | |
|         echo remove ${path}
 | |
|         rm -rf ${path}
 | |
|     end
 | |
|   end
 | |
|   """]
 | |
| script_runner = "@duckscript"
 |