Inline the TailwindCLI into dx and run it during serve (#4086)
* wip: download the tailwind cli and then run it during serve * allow no-downloads again
This commit is contained in:
1 parent
7d5bd44791
commit
cb651a8ca2
11 files changed
+242
-11
No files matched your search
@@ -657,8 +657,6 @@ impl AppBuilder {
|
||||
None => self.build.asset_dir(),
|
||||
};
|
||||
|
||||
tracing::debug!("Hotreloading asset {changed_file:?} in target {asset_dir:?}");
|
||||
|
||||
// Canonicalize the path as Windows may use long-form paths "\\\\?\\C:\\".
|
||||
let changed_file = dunce::canonicalize(changed_file)
|
||||
.inspect_err(|e| tracing::debug!("Failed to canonicalize hotreloaded asset: {e}"))
|
||||
@@ -668,6 +666,8 @@ impl AppBuilder {
|
||||
let resource = artifacts.assets.assets.get(&changed_file)?;
|
||||
let output_path = asset_dir.join(resource.bundled_path());
|
||||
|
||||
tracing::debug!("Hotreloading asset {changed_file:?} in target {asset_dir:?}");
|
||||
|
||||
// Remove the old asset if it exists
|
||||
_ = std::fs::remove_file(&output_path);
|
||||
|
||||
@@ -1310,6 +1310,6 @@ We checked the folder: {}
|
||||
|
||||
/// Check if the queued build is blocking hotreloads
|
||||
pub(crate) fn can_receive_hotreloads(&self) -> bool {
|
||||
matches!(&self.stage, BuildStage::Success)
|
||||
matches!(&self.stage, BuildStage::Success | BuildStage::Failed)
|
||||
}
|
||||
}
|
||||
@@ -3758,4 +3758,14 @@ r#" <script>
|
||||
trimmed_path
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the path to the package manifest directory
|
||||
pub(crate) fn package_manifest_dir(&self) -> PathBuf {
|
||||
self.workspace.krates[self.crate_package]
|
||||
.manifest_path
|
||||
.parent()
|
||||
.unwrap()
|
||||
.to_path_buf()
|
||||
.into()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user