aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
150 stars 57 forks source link

typescript confiugration file item template #854

Closed dazinator closed 7 years ago

dazinator commented 7 years ago

When the typescript configuration file is added to a project, by default it is "content" which also by default means it ends up being included in the nuget package when you do a dotnet pack. Given that the typescript configuration file is used primarily at build time, I don't think it should be included in a resulting nuget pack by default. Can it be changed to create this in the csproj:

 <ItemGroup>
    <Content Update="Scripts\tsconfig.json">
      <Pack>false</Pack>
    </Content>
  </ItemGroup>

Without this, if another project takes a dependency on this nuget package, you get build errors like this:


Severity    Code    Description Project File    Line    Suppression State
Error   TS18003 Build:No inputs were found in config file 'C:/Users/darrell.tunnell/.nuget/packages/gluon.module.themeswitcher/2.0.0/contentFiles/any/net452/Scripts/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["node_modules","wwwroot"]'.   Reach.GCv3.Mvc.Module.CompanyLogo   C:\Users\darrell.tunnell\Source\Repos\gc3-website\src\Reach.GCv3.Mvc.Module.CompanyLogo\tsc 1   

i.e VS is doscovering the typescript configuration files within referenced nuget packages!

mlorbetske commented 7 years ago

This issue was moved to aspnet/websdk#222