almasaeed2010 / adminlte v2.4.18需要bower-asset / jquery

时间:2019-10-05 12:18:56

标签: jquery bower adminlte

我正在尝试通过作曲家安装almasaeed2010 / adminlte v2.4.18,但是,出现以下错误

almasaeed2010/adminlte v2.4.18 requires bower-asset/jquery >=1.9.0 <4.0.0 -> no matching package found.

我似乎在packagist中找不到bower-asset / jquery,有什么主意我做错了吗?

1 个答案:

答案 0 :(得分:0)

我需要添加资产包装专家存储库,您可以按照

上的说明进行操作
function ConvertTo-HTMLTable ($obj) {
    # add type needed to replace HTML special characters into entities
    Add-Type -AssemblyName System.Web

    $sb = New-Object -TypeName System.Text.StringBuilder
    [void]$sb.AppendLine('<table>')
    if ($null -ne $obj) {
        $headers = $obj[0].PSObject.Properties | Select -ExpandProperty Name
        [void]$sb.AppendLine('<thead><tr>')
        foreach ($column in $headers) {
            [void]$sb.Append(('<th>{0}</th>' -f [System.Web.HttpUtility]::HtmlEncode($column)))
        }
        [void]$sb.AppendLine('</tr></thead><tbody>')
        [double]$num = 0
        $obj | ForEach-Object {
            foreach ($column in $headers) {
                [string]$val = $_.$column
                # test if $val contains a number, and if so check if it is less than 5 or greater than 80
                if ([double]::TryParse($val, [System.Globalization.NumberStyles]::Float, 
                                       [System.Globalization.CultureInfo]::InvariantCulture, [ref]$num)) {
                    # it's a numeric value, see it we need to change color
                    $td = if ($num -gt 80 -or $num -lt 5) {"<td style=color:red;>$val</td>"} else {"<td>$val</td>"}
                }
                elseif ([string]::IsNullOrWhiteSpace($val)) { 
                    $td = '<td>&nbsp;</td>' 
                } 
                else { 
                    $td = '<td>{0}</td>' -f [System.Web.HttpUtility]::HtmlEncode($val)
                }
                [void]$sb.Append($td)
            }
            [void]$sb.AppendLine('</tr>')
        }
        [void]$sb.AppendLine('</tbody>')
    }
    [void]$sb.AppendLine('</table>')

    return $sb.ToString()
}



$css = @"
<style>
h1, h5, th, td { text-align: center; font-family: Segoe UI; }
table { margin: auto; font-family: Segoe UI; box-shadow: 10px 10px 5px #888; border: thin ridge grey; }
th { background: #0046c3; color: #fff; max-width: 400px; padding: 5px 10px; }
td { font-size: 11px; padding: 5px 20px; color: #000; }
tr { background: #b8d1f3; }
tr:nth-child(even){ background: #dae5f4; }
</style>
"@

$body  = "<h1>Email Report</h1>`r`n<h5>Generated on $(Get-Date)</h5>"
$table = ConvertTo-HTMLTable (Import-CSV "D:\health.csv")
$html  = @"
<!DOCTYPE html>
<html>
<head>
<title>Report</title>
<meta name="generator" content="PowerShell" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
$css
</head>
<body>
$body
$table
</body></html>
"@

$html | Out-File "D:\health.html" -Force

然后我添加了

 https://asset-packagist.org/

进入要求部分