Recent Articles

In this article I am going to talk about how you can speed up your development by using templates in Sublime Text and JetBrains IDE’s (WebStorm, PhpStorm, etc). Below you can see the snippets in action. Just hit the Tab key to fill in the next predefined input area. Creating a Property Creating a Method […]

continue reading »

Full credit for this article goes to Peter Elst. I took a really old article of his and modified it to talk about TypeScript. What is OOP In object-oriented programming, developers often use the term “architecting an application.” This analogy is not far off the mark. You can approach any project as if you are […]

continue reading »

In this TypeScript RequireJS tutorial I will show you how to setup AMD classes, setup your config file and how to use RequireJS plugins with TypeScript. TypeScript AMD Classes Below is how we setup a AMD class that we can use with RequireJS. The most important part is to have the export statement below the […]

continue reading »

Final I figured out how to do both TypeScript AMD & CommonJS external modules and TypeScript Internal module classes. Hopefully you can get started right away with my examples below. TypeScript External Modules Classes Below is how to setup TypeScript AMD/CommonJS classes so they will output correctly. You can check out my TypeScript AMD(RequireJS) Example […]

continue reading »

When creating JavaScript classes you will run into an issue where you cannot remove event listeners once you’ve added them. To get this to work you typically need to assign your bind function call(s) to a property on the class. You can see this in the Example 1 below in the setupHandlers method. The jQuery […]

continue reading »

I just wanted to share a few good TypeScript links I have found. TypeScript Cheat Sheet The Definitive TypeScript Guide TypeScript Handbook TypeScript Wiki Also checkout my TypeScript Tutorials.

continue reading »

Being a former ActionScript developer, TypeScript is the next best thing and I wanted to share my TypeScript workflow. This is not a TypeScript workflow for Visual Studio. My IDE of choice is WebStorm/PhpStorm and they both have great TypeScript support. Let Something Else Do The Grunt Work My whole TypeScript workflow is handle by […]

continue reading »

I am going to take my first TypeScript Source Maps Example a step future. I am going to take our compiled TypeScript code and then use UglifyJS to minify it. UglifyJS will also create a new source map for the minified version of the code. I am going to assume you have read my first […]

continue reading »

I put together a fast TypeScript Source Maps example. Currently it only works in Google Chrome but first you need to enable source maps. Open the “Developer Tools” panel and then click on the “gear” icon (bottom right). Then go to Settings > General and check “Enable JS source maps”. In the code I created […]

continue reading »

Just a quick tutorial on how to compile JSON files into a single JavaScript file. This is very easy with GruntJS and the grunt-json plugin. Grunt JS Setup If you have never used GruntJS before you probably need to checkout my Install Grunt JS on a Mac Tutorial or Install Grunt JS on Windows Tutorial. […]

continue reading »

In this TypeScript tutorial I will go over how to generate code documents from your TypeScript files. We will be using YUIDoc’s and GruntJS. Grunt JS Setup If you have never used GruntJS before you will need to checkout my Install Grunt JS on a Mac Tutorial or Install Grunt JS on Windows Tutorial. Example […]

continue reading »

I just love PhpStorm/WebStorm support for Typescript. In this simple tutorial I will show you how to create a Class template for TypeScript to make your development a little faster. Here is the template. Notice the ${Name} placeholder. That will place the name of the file you typed in. To create a new file template […]

continue reading »

I just updated to TypeScript version 0.9.0 and stuff was breaking. I know they said stuff is going to break and I can handle that but I couldn’t get anything to work with jQuery. I even tried the office TypeScript sample example and it breaks. Here was my issue: error TS2172: All named properties must […]

continue reading »

I started playing around with creating a workflow for creating single page applications with JavaScript. The big player in this workflow is GruntJS. In this Single Page JavaScript Application Workflow Tutorial I will explain how to setup a build process for your development and production environment. We will be using several GruntJS plugins to help […]

continue reading »

GreenSock TweenMax/TweenLite was there for me when I did ActionScript development. Now that Flash is almost dead GreenSock TweenMax/TweenLite JS is there for me doing JavaScript development. I am doing more and more JavaScript and I want to create nice JavaScript documents for my code but I am having a hard time finding a nice […]

continue reading »

In this tutorial I will show you how to Precompile JavaScript Underscore Templates with GruntJS. I will be using the GruntJS JST Plugin. Grunt JS Setup If you have never used GruntJS before you will need to checkout my Install Grunt JS on a Mac Tutorial or Install Grunt JS on Windows Tutorial. Now download […]

continue reading »

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript which primarily provides static typing, classes and interfaces. Basically you are writing JavaScript with a few conventions that helps you writing cleaner code which will compile into normal JavaScript. One of the big benefits is to enable IDEs to provide code completion, spotting […]

continue reading »

I just started looking at EaselJS “A Javascript library that makes working with the HTML5 Canvas element easy”. I am a be fan of GreenSock’s tweening and easing library so I wanted to see how I could get TweenLite working with EaselJS. In this JavaScript tutorial I will show a very simple example how you […]

continue reading »

In this tutorial I will show you how to compile sass files into a single css file. The technique is great for working in teams where others may not have an EDI that supports compiling sass files. Install Ruby and Sass First thing we need to is get Ruby and Sass installed on our computer. […]

continue reading »

Google and CodeSchool announced a new course that helps people use Chrome Developer Tools. There appears to be a lot of great video tutorials for beginners and intermediate users of the Developer Tools. Here are the links to check it out: Chrome Developer Tools Video Tutorials http://discover-devtools.codeschool.com Google Blog Post http://blog.chromium.org/2013/03/discover-chrome-devtools-our-new.html Discover DevTools Companion Extention […]

continue reading »

Before you install Grunt.js you will need to have node.js installed. For this tutorial I have node.js v0.10.0 installed. I will be installing Grunt.js v0.4.1. WARNING if you have Grunt.j 0.3.x or less you will need to uninstall it first. Grunt’s command line interface (CLI) To get grunt.js installed we need to first install Grunt’s […]

continue reading »

Before you install Grunt.js you will need to have node.js installed. For this tutorial I have node.js v0.10.0 installed. I will be installing Grunt.js v0.4.1. WARNING if you have Grunt.j 0.3.x or less you will need to uninstall it first. Grunt’s command line interface (CLI) To get grunt.js installed we need to first install Grunt’s […]

continue reading »

I am working on a BulkLoader class to load different types of files and wanted to use the Singleton pattern for it. This way I can load files from my main application class and retrieve the loaded files easily from other classes. Below is a simple example how you can make a score manager for […]

continue reading »

In this TypeScript tutorial I will be going over TypeScript Getters and Setters which are called TypeScript Accessor. To get TypeScript Accessor’s working we need to let the compiler know we want to export the code as ECMAScript 5 compliant. Below is the TypeScript command: Below you will notice that there are two methods named […]

continue reading »

So I’ve playing around with the TypeScript Arrow Function Expression. In this TypeScript tutorial I will show you a couple of examples using Arrow Functions. Below you will see some normal JavaScript where we create an Image Object. We pass in an anonymous function to be called by the Image Object’s “onload” event but we […]

continue reading »

Another cool thing about TypeScript is the use of default parameters right in the function parameters. Take a look below and see how easy it is. I added them to the addPerson Method/Function but you can also added it to your class constructor. You can see default parameters in the constructor in my other TypeScript […]

continue reading »

More and more I play around with TypeScript I think it is the best way to do JavaScript development for large and small projects. One thing I’ve noticed is some people are not aware of how easy it is to compile all your referenced .ts files into one JavaScript .js file. I am not sure […]

continue reading »

What are …rest parameters? …rest parameters are an identifier that represents the name of the array of arguments passed in to the function. The parameter does not need to be called rest; it can have any name that is not a keyword. You can specify the data type of the … (rest) parameter as any[] […]

continue reading »