Skip to content

Commit da43eea

Browse files
committed
Added VSTS build
1 parent 12e1212 commit da43eea

File tree

9 files changed

+76
-16
lines changed

9 files changed

+76
-16
lines changed

.vsts-ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
queue: 'Hosted VS2017'
2+
3+
variables:
4+
buildConfiguration: 'Release'
5+
6+
steps:
7+
- task: Npm@1
8+
inputs:
9+
command: 'install'
10+
workingDir: src/Blazor.Extensions.Storage.JS
11+
12+
- task: DotNetCoreCLI@2
13+
inputs:
14+
command: 'build'
15+
projects: '**/*.csproj'
16+
arguments: '--configuration $(buildConfiguration)'
17+
18+
- task: DotNetCoreCLI@2
19+
inputs:
20+
command: pack
21+
packagesToPack: 'src/Blazor.Extensions.Storage/*.csproj'
22+
configuration: '$(buildConfiguration)'
23+
versioningScheme: byPrereleaseNumber
24+
majorVersion: '0'
25+
minorVersion: '1'
26+
patchVersion: '0'

.vsts-release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
queue: 'Hosted VS2017'
2+
3+
variables:
4+
buildConfiguration: 'Release'
5+
6+
steps:
7+
- task: Npm@1
8+
inputs:
9+
command: 'install'
10+
workingDir: src/Blazor.Extensions.Storage.JS
11+
12+
- task: DotNetCoreCLI@2
13+
inputs:
14+
command: 'build'
15+
projects: '**/*.csproj'
16+
arguments: '--configuration $(buildConfiguration)'
17+
18+
- task: DotNetCoreCLI@2
19+
inputs:
20+
command: pack
21+
packagesToPack: 'src/Blazor.Extensions.Storage/*.csproj'
22+
packDirectory: '$(build.artifactStagingDirectory)'
23+
configuration: '$(buildConfiguration)'
24+
versioningScheme: byEnvVar
25+
versionEnvVar: Version
26+
27+
- task: NuGetCommand@2
28+
inputs:
29+
command: push
30+
packagesToPush: '$(build.artifactStagingDirectory)/*.nupkg'
31+
publishFeedCredentials: 'BlazorExtensions'
32+
nuGetFeedType: external
33+
versioningScheme: byEnvVar
34+
versionEnvVar: Version

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ This package wraps [HTML5 Storage](https://developer.mozilla.org/en-US/docs/Web/
1515

1616
## Setup
1717

18-
The following snippet shows how to setup the storage wrapper by registering it for dependency injection in the ```Program.cs``` of the application.
18+
The following snippet shows how to setup the storage wrapper by registering it for dependency injection in the ```Startup.cs``` of the application.
1919

2020
```c#
21-
var serviceProvider = new BrowserServiceProvider(services =>
21+
public void ConfigureServices(IServiceCollection services)
2222
{
2323
// Add Blazor.Extensions.Storage
2424
// Both SessionStorage and LocalStorage are registered
2525
services.AddStorage();
26-
});
26+
}
2727
```
2828

2929
## Usage

src/Blazor.Extensions.Storage.JS/Blazor.Extensions.Storage.JS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.4.0" />
19+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.5.0" />
2020
<WebpackInputs Include="**\*.ts" Exclude="dist\**;node_modules\**" />
2121
</ItemGroup>
2222

src/Blazor.Extensions.Storage.JS/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"build": "webpack",
7+
"build": "webpack-cli",
88
"test": "echo \"Error: no test specified\" && exit 1"
99
},
1010
"devDependencies": {
1111
"@types/emscripten": "0.0.31",
12-
"typescript": "^2.6.1",
13-
"webpack": "^3.8.1",
14-
"ts-loader": "^3.2.0"
12+
"webpack": "^4.16.0",
13+
"webpack-cli": "^3.0.8",
14+
"typescript": "^2.9.2",
15+
"ts-loader": "^4.4.2"
1516
}
1617
}

src/Blazor.Extensions.Storage/Blazor.Extensions.Storage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.4.0" />
14+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.5.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<Import Project="$(_ParentDirectoryBuildTargetsPath)" Condition="Exists('$(_ParentDirectoryBuildTargetsPath)')"/>
77

88
<ItemGroup Condition="'$(IsPackable)'=='true' and '$(SourceLinkCreate)'=='true' and '$(IncludeBuildOutput)'=='true'">
9-
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.1" PrivateAssets="all" />
9+
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.2" PrivateAssets="all" />
1010
</ItemGroup>
1111
</Project>

test/Blazor.Extensions.Storage.Test/Blazor.Extensions.Storage.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Blazor.Extensions.Logging" Version="0.1.2" />
12-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.4.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.4.0" />
14-
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.4.0" />
11+
<PackageReference Include="Blazor.Extensions.Logging" Version="0.1.3" />
12+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.5.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.5.0" />
14+
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.5.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

test/Blazor.Extensions.Storage.Test/wwwroot/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<body>
1010
<app>Loading...</app>
1111

12-
<script type="blazor-boot">
13-
</script>
12+
<script src="_framework/blazor.webassembly.js"></script>
1413
</body>
1514
</html>

0 commit comments

Comments
 (0)