Private/Angular/Setup/Edit-AngularAddAgGrid.ps1

<#
 # Import ag-grid module and add correct import statements and CSS entries
 #>

Function New-NgServerGridComponent([WebCsprojInfo]$webCsprojInfo)
{
    Install-NodeModule $webCsprojInfo "ag-grid" "AgGridModule" "ag-grid-angular/main" "AgGridModule.withComponents([])"
    Install-NodeModule $webCsprojInfo "ag-grid-angular" 

    Edit-String -File "$($webCsprojInfo.angularDir)/src/styles.css" -Match "." -LastRowRepeats -UnlessAlreadyMatches "ag-grid.css" `
        -Append "@import '../node_modules/ag-grid/dist/styles/ag-grid.css';","@import '../node_modules/ag-grid/dist/styles/theme-fresh.css';"

}