Pārlūkot izejas kodu

feat(cli/core): add support for building without targets (#1203)

Noah Klayman 4 gadi atpakaļ
vecāks
revīzija
4d507f9adf
2 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 5 0
      .changes/cli-no-targets.md
  2. 3 0
      cli/core/src/build.rs

+ 5 - 0
.changes/cli-no-targets.md

@@ -0,0 +1,5 @@
+---
+"tauri-cli": minor
+---
+
+You can now run `cargo tauri build -t none` to speed up the build if you don't need executables.

+ 3 - 0
cli/core/src/build.rs

@@ -71,6 +71,9 @@ impl Build {
     if let Some(names) = self.targets {
       let mut types = vec![];
       for name in names {
+        if name == "none" {
+          break;
+        }
         match PackageType::from_short_name(&name) {
           Some(package_type) => {
             types.push(package_type);