-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.proj
50 lines (41 loc) · 2.65 KB
/
build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RepoDirectory Condition=" '$(RepoDirectory)' == '' ">$(MSBuildThisFileDirectory)</RepoDirectory>
<MscaToolkitDirectory Condition=" '$(MscaToolkitDirectory)' == '' ">$(MSBuildThisFileDirectory)/src/msca-toolkit</MscaToolkitDirectory>
<MscaToolkitProjFilePath Condition=" '$(MscaToolkitProjFilePath)' == '' ">$(MscaToolkitDirectory)/msca-toolkit.proj</MscaToolkitProjFilePath>
</PropertyGroup>
<PropertyGroup Label="TypeScript">
<TypeScriptCompileBlocked Condition=" '$(TypeScriptCompileBlocked)' == '' ">false</TypeScriptCompileBlocked>
<TypeScriptToolsVersion Condition=" '$(TypeScriptToolsVersion)' == '' ">4.0</TypeScriptToolsVersion>
<TypeScriptConfigFileName Condition=" '$(TypeScriptConfigFileName)' == '' ">tsconfig.json</TypeScriptConfigFileName>
<TypeScriptConfigFilePath>$(MSBuildProjectDirectory)/$(TypeScriptConfigFileName)</TypeScriptConfigFilePath>
<TscYieldDuringToolExecution>false</TscYieldDuringToolExecution>
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
</PropertyGroup>
<PropertyGroup Label="Npm">
<NpmInstall Condition=" '$(NpmInstall)' == ''">false</NpmInstall>
</PropertyGroup>
<!-- TypeScript Compiler imports -->
<Import
Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets"
Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
<ItemGroup>
<ConfigFiles Include="$(TypeScriptConfigFilePath)" />
</ItemGroup>
<!-- Override the TypeScript FindConfigFiles Target so that default tsconfig.json is not picked up -->
<Target Name="FindConfigFiles"></Target>
<Target
Name="NpmInstall"
Inputs="$(MSBuildProjectDirectory)"
Outputs="$(MSBuildProjectDirectory)\node_modules"
Condition=" '$(NpmInstall)' == 'true' ">
<Message Text="Installing npm dependencies in: $(MSBuildProjectDirectory)..." />
<Exec Command="npm install" WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>
<Target Name="Build" DependsOnTargets="NpmInstall;$(CompileDependsOn)">
<Message Text="TypeScriptConfigFilePath = $(TypeScriptConfigFilePath)..." />
<Copy SourceFiles="$(MscaToolkitProjFilePath)" DestinationFolder="$(RepoDirectory)/lib/msca-toolkit" />
</Target>
</Project>