Created
August 16, 2018 02:49
-
-
Save jamiehowarth0/a8818c237484f1670f4d1a2256de4a37 to your computer and use it in GitHub Desktop.
Finds all the JS files in your ASP.NET project ready to then bundle them up using a tool like Webpack.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gci -Include "*.cshtml" -recurse | select -expand FullName | where { -not [string]::IsNullOrEmpty($_) } | foreach { Select-String -Path $_ -Pattern '~(.*\.js)' -AllMatches } | foreach {$_.Matches.Groups[1].Value} | Sort-Object | Get-Unique -AsString > .\alljs.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment