aspnet / dnx

OBSOLETE - see readme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript compilation on dnu publish

NickAb opened this issue · comments

I have asp.net 5 rc1 project with typescript.

When build via Visual Studio it produces compile app.js file.
But when I run dnu build or dnu publish typescript does not compile automatically.

Should I add gulp task to build typescript or there is some options to build typescript when publishing using dnu?

Invoking msbuild does compile typescript, but require typings to be restored before invoking msbuild even if prebuild step to restore typings is included in project.json.

prebuild step from project.json does get executed, but only after msbuild invokes CompileTypeScriptWithTSConfig. So prebuild does not have any chance to restore typings to make typescript compilation successful.

What is preferred way to go about preparing asp net core project for deployment:

  1. use msbuild: install npm packages and restore typings before invoking msbuild. Invoke msbuild with deploy on build
  2. use msbuild: add custom step to xproj to run before CompileTypeScriptWithTSConfig and use msbuild
  3. use dnu: add typescript compilation step to project.json scripts section and use dnu publish