-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make build.cmd work and do npm pack (#45)
Make build.cmd work and do npm pack
- Loading branch information
1 parent
8724336
commit dd69746
Showing
6 changed files
with
569 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
bower_components/ | ||
node_modules/ | ||
*.nupkg | ||
*.nupkg | ||
artifacts/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,37 @@ | ||
<Project> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<VersionFile Include="version.props"/> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<NuspecPath>Microsoft.jQuery.Unobtrusive.Ajax.nuspec</NuspecPath> | ||
<DistDir>$(MSBuildThisFileDirectory)dist\</DistDir> | ||
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts\build\</ArtifactsDir> | ||
<WebPackTestDir>$(MSBuildThisFileDirectory)test\webpacktest\</WebPackTestDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<DistDirFiles Include="$(DistDir)*"/> | ||
</ItemGroup> | ||
|
||
<Target Name="Build"> | ||
<ReadLinesFromFile File="@(VersionFile)"> | ||
<Output TaskParameter="Lines" PropertyName="PackageVersion"/> | ||
</ReadLinesFromFile> | ||
<Exec Command="npm install" /> | ||
<Exec Command="npm run build" /> | ||
<Exec Command="npm version --no-git-tag-version --allow-same-version $(PackageVersion)" /> | ||
<Exec Command="npx gulp" /> | ||
<Exec Command="nuget pack $(NuspecPath) -Version $(PackageVersion)" /> | ||
<MakeDir Directories="$(ArtifactsDir)" /> | ||
<Copy | ||
SourceFiles="@(DistDirFiles)" | ||
DestinationFolder="$(ArtifactsDir)" OverwriteReadOnlyFiles="true"/> | ||
<Exec Command="npm pack $(MSBuildThisFileDirectory)" WorkingDirectory="$(ArtifactsDir)" /> | ||
<Exec Command="nuget pack $(NuspecPath) -Version $(PackageVersion) -OutputDirectory $(ArtifactsDir)" /> | ||
|
||
<MSBuild Projects ="$(MSBuildProjectFullPath)" | ||
Properties="PackageVersion=$(PackageVersion)" | ||
Targets="Test" /> | ||
</Target> | ||
|
||
<Target Name="Test"> | ||
<Message Text="No tests yet..." /> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.