Posts

Showing posts from April, 2019

Getting started with Aurelia JS

Image
A cut-down version of the quickstart tutorial given at Aurelia's official site: https://aurelia.io/docs/tutorials/creating-a-todo-app The Aurelia CLI has a pre-requisite, Node.js. Get it from here: https://nodejs.org/en/ Step 1: Download the Basic Aurelia Project Setup Get the zip file from this link: http://aurelia.io/downloads/basic-aurelia-project.zip Step 2: Create a project In Windows Explorer create a directory for your Aurelia project: Extract the files from the basic Aurelia project setup and paste them into here: Step 3: Create an example Todo.js class In the src/ folder insert the following code for todo.js todo.js [code language="js"] export class Todo { constructor(description) { this.description = description; this.done = false; } } [/code] Step 4: Add the app.js class In the src/ folder add the following app.js file: app.js [code language="js"] import {Todo} from './todo'; ...

Using TypeScript in Visual Studio 2017

Image
See this link for very similar instructions: https://www.typescriptlang.org/docs/handbook/asp-net-core.html Step 1: Create a new Asp.Net Core project Select Empty project: Click OK. Step 2: Add Microsoft.AspNetCore.StaticFiles via NuGet Right click on Dependencies and select Manage NuGet Packages: Select Browse and search for 'Microsoft.AspNetCore.StaticFiles': Select this item and click Install. Step 3: Add a scripts folder for TypeScript First update the body of Configure in Startup.cs file as shown: Startup.cs [code language="csharp"] using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace AspDotNetCore { public class Startup { // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices...

Getting started with TypeScript in Visual Studio Code

Image
Some instructions that distill how one may get started with using TypeScript in Visual Studio Code. Step 1: Set up your development environment Download and run the installer for Visual Studio Code from the following link: https://code.visualstudio.com/download Step 2: Install node.js Download and run the installer for node.js from the following link: https://nodejs.org/ Step 3: Install TypeScript Once node.js has been installed you can install TypeScript. Close VS Code if opened and open a command prompt and run the command: [code language="xml"] npm install -g typescript [/code] (Use the -g to ensure typescript is installed globally, not just for the folder you are in.) Step 4: Set up an example project Open VS Code. Create a new Terminal by selecting Terminal > New Terminal. Create a directory for your project using the mkdir command and navigate to that folder: Close the terminal and open the folder you just created by selecting File...