Skip to content

Commit c425551

Browse files
committed
Build UI when building in release mode
1 parent 88adaa9 commit c425551

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Our.Umbraco.GraphQL/Our.Umbraco.GraphQL.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,22 @@
1515
<TargetFramework>net452</TargetFramework>
1616
<AssemblyName>Our.Umbraco.GraphQL</AssemblyName>
1717
<RootNamespace>Our.Umbraco.GraphQL</RootNamespace>
18+
<UIRoot>Web\UI\</UIRoot>
19+
<DefaultItemExcludes>$(DefaultItemExcludes);$(UIRoot)node_modules\**;$(UIRoot).sass-cache\**</DefaultItemExcludes>
1820
</PropertyGroup>
1921

2022
<ItemGroup>
23+
<None Include="$(FrontendRoot)**" Exclude="$(UIRoot)node_modules\**;$(UIRoot).sass-cache\**" Pack="false" />
24+
</ItemGroup>
25+
26+
<Target Name="RunUIBuild" BeforeTargets="Compile" Condition=" '$(Configuration)' == 'Release' ">
27+
<Exec WorkingDirectory="$(UIRoot)" Command="npm install" />
28+
<Exec WorkingDirectory="$(UIRoot)" Command="npm run build" />
29+
</Target>
30+
31+
<ItemGroup>
32+
<None Include="tools\**" Pack="True" PackagePath="tools\" />
33+
<None Include="$(UIRoot)dist\**" Pack="True" PackagePath="content\" />
2134
<None Include="content\**" Pack="True" PackagePath="content\" />
2235
</ItemGroup>
2336

src/Our.Umbraco.GraphQL/Web/UI/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"type": "git",
2222
"url": "https://github.com/rasmusjp/umbraco-graphql"
2323
},
24+
"scripts": {
25+
"clean": "grunt clean",
26+
"build": "npm run clean && grunt"
27+
},
2428
"devDependencies": {
2529
"grunt-msbuild": "^0.4.4",
2630
"grunt-string-replace": "^1.3.1",

0 commit comments

Comments
 (0)