Skip to content

Instantly share code, notes, and snippets.

@Jaykul
Last active January 10, 2017 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaykul/d76863f56447baa06899a87944b84374 to your computer and use it in GitHub Desktop.
Save Jaykul/d76863f56447baa06899a87944b84374 to your computer and use it in GitHub Desktop.
Thinking about MSBuild for PowerShell
<Target Name="CombineFiles">
<CreateItem Include=".\**\*.ps1">
<Output TaskParameter="Include" ItemName="ScriptsToCombine" />
</CreateItem>
<ReadLinesFromFile File="%(ScriptsToCombine.FullPath)">
<Output TaskParameter="Lines" ItemName="ScriptLines" />
</ReadLinesFromFile>
<WriteLinesToFile File="output.psm1" Lines="@(ScriptLines)" Overwrite="true" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment