Typescript compilation on dnu publish
NickAb opened this issue · 1 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:
- use msbuild: install npm packages and restore typings before invoking msbuild. Invoke msbuild with deploy on build
- use msbuild: add custom step to xproj to run before
CompileTypeScriptWithTSConfig
and use msbuild - use dnu: add typescript compilation step to
project.json
scripts
section and usednu publish