Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuget #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Nuget #38

wants to merge 4 commits into from

Conversation

raysplaceinspace
Copy link

Note that this branch starts from the no-build-bat (another pull request) because that was a necessary dependency. The only actual change on this branch is the addition of WootzJs.Compiler.nuspec. This allows us to compile the WootzJs compiler and publish it straight to NuGet. I didn't do the other bits because I was only using the compiler and I didn't have an easy way to test the rest.

I haven't pushed the WootzJs.Compiler to a public nuget, but if we were to do that, now people could just run nuget install WootzJs.Compiler from their command line and they'll have the compiler. This means they don't have to have the source code at all, which we didn't want to do for our continuous integration. Here are some snippets from our csproj, notice how they all reference "..\packages\WootzJs.Compiler.x.x.x":

  <ItemGroup>
    <Content Include="..\packages\WootzJs.Compiler.1.0.2\tools\build\mscorlib.js">
      <Link>mscorlib.js</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <Import Project="..\packages\WootzJs.Compiler.1.0.2\tools\build\WootzJs.targets" Condition=" '$(WootzJs)' != '' " />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <PropertyGroup><PostBuildEvent>$(ProjectDir)..\packages\WootzJs.Compiler.1.0.2\tools\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
  </PropertyGroup>

You can see we output mscorlib.js from our csproj because we want to make a complete build output with all the required JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant