private string GetOutputPath(BundleDefinition bundle) { if (string.IsNullOrEmpty(bundle.OutputPath)) { return(Path.GetFullPath(Path.Combine(OutputPath, bundle.Name + ".js"))); } var directory = Path.GetDirectoryName(bundle.OutputPath) ?? ""; var fileName = Path.GetFileName(bundle.OutputPath); if (string.IsNullOrEmpty(fileName)) { fileName = bundle.Name + ".js"; } return(Path.GetFullPath(Path.Combine(OutputPath, directory, fileName))); }
private string GetOutputPath(BundleDefinition bundle) { if (string.IsNullOrEmpty(bundle.OutputPath)) { return Path.GetFullPath(Path.Combine(OutputPath, bundle.Name + ".js")); } var directory = Path.GetDirectoryName(bundle.OutputPath) ?? ""; var fileName = Path.GetFileName(bundle.OutputPath); if (string.IsNullOrEmpty(fileName)) { fileName = bundle.Name + ".js"; } return Path.GetFullPath(Path.Combine(OutputPath, directory, fileName)); }