Private/Angular/Setup/Add-AgGrid.ps1

<############################################################################
 # Add ag-grid support to an angular project
 ############################################################################>

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

    # Add ag-grid styles
    Edit-String -File $webCsprojInfo.stylesCss -Append `
        "@import '../node_modules/ag-grid/dist/styles/ag-grid.css';","@import '../node_modules/ag-grid/dist/styles/theme-fresh.css';" `
        -UnlessAlreadyMatches "ag-grid.css"

}