Skip to content

Commit 4d262c1

Browse files
authored
Merge pull request #31 from rasmusjp/feature/ui-build
Added UI build
2 parents 88adaa9 + 2888955 commit 4d262c1

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

appveyor.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
version: '{build}'
22
os: Visual Studio 2017
3+
shallow_clone: true
34
init:
5+
- set PATH=C:\Ruby25\bin;%PATH%
46
- git config --global core.autocrlf input
57
- git config --global core.longpaths true
6-
shallow_clone: true
8+
install:
9+
- gem install sass
710
build_script:
811
build.cmd package
912
test: off

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",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<dashBoard>
3+
<section alias="GraphQLForUmbraco">
4+
<areas>
5+
<area>developer</area>
6+
</areas>
7+
<tab caption="GraphQL">
8+
<control>
9+
/App_Plugins/GraphQLForUmbraco/views/dashboard.html
10+
</control>
11+
</tab>
12+
</section>
13+
</dashBoard>

tools/build.fsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,25 @@ Target.create "Clean" (fun _ ->
2727
)
2828

2929
Target.create "Build" (fun _ ->
30+
let setMSBuildParams (defaults:MSBuild.CliArguments) =
31+
{ defaults with
32+
Properties =
33+
[
34+
"Version_Suffix", if buildVersion.IsSome then buildVersion.Value else ""
35+
]
36+
}
37+
3038
DotNet.build (fun c ->
3139
{ c with
3240
Configuration = DotNet.BuildConfiguration.Release
33-
OutputPath = Some artifactsDir
41+
MSBuildParams = setMSBuildParams c.MSBuildParams
3442
}) solutionFile
3543
)
3644

3745
Target.create "Package" (fun _ ->
3846
DotNet.pack (fun c ->
3947
{ c with
48+
NoBuild = true
4049
Configuration = DotNet.BuildConfiguration.Release
4150
OutputPath = Some artifactsDir
4251
VersionSuffix = buildVersion
@@ -52,6 +61,7 @@ open Fake.Core.TargetOperators
5261
==> "Default"
5362

5463
"Clean"
64+
==> "Build"
5565
==> "Package"
5666

5767
// start build

0 commit comments

Comments
 (0)