I have created an ASP.net MVC WebApi 2 project using Visual Studio Asp.Net SPA project template and installed Aurelia into the root folder by running the following jspm commands. I have selected TypeScript as a transpiler.
jspm init
jspm install aurelia-framework
jspm install aurelia-bootstrapper
Now I need to install/configure TypeScript for the project.
Could anyone post steps to follow?
UPDATE
How can I add Typescript support for the existing project? I renamed the app.js
file to app.ts
. I have added the tsconfig.json
file as well.
Project folder structure:
tsconfig file:
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es6",
"moduleResolution": "node",
"experimentalDecorators": true,
"module": "system"
}
}
App.Ts File
import { inject } from 'aurelia-framework';
import { HttpClient } from 'aurelia-http-client';
@inject(HttpClient)
export class App {
message: string;
http: any;
constructor(httpClient: HttpClient) {
this.http = httpClient;
}
}
When I build the project, the build fails due to the following error.
The gulp task you are looking for is 'build' , which can be found here, it is part of the skeleton project.
Open build task on github