Showing posts with label OS X. Show all posts
Showing posts with label OS X. Show all posts

Monday, March 14, 2016

How to use TypeScript in Sublime Text Editor

Hi All,


If you are trying to use TypeScript features in Sublime Text 3. This blog post describes step by step on how to start coding and utilize TypeScript features including intelliSense, compile time checking, validation...etc in Sublime.

Follow this walkthrough:

1) You need to have Package Control in Sublime, if you do not have it follow below steps. otherwise, continue reading step 2.

  • Open sublime text console by clicking on the top menu: View --> Show Console

  • Upon opening the console, you will see the console shows at the bottom of sublime

  • Copy this text in the console

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
  • Close and re-open sublime text 3
2) We need to install TypeScript from Package Control by searching for this package. To open package control, We need to open Command Palette from tools menu.



3) Then type Install Package in the popup window.



4) Package Control will popup and then search for TypeScript plugin by writing: TypeScript and then select the package.

Note: you will notice i do not have typescript screenshot since it is already installed on sublime

5) Now, try to add any TypeScript file (with .ts extension) and you will be able to use TS features while writing code in Sublime Text!



Enjoy!


Friday, June 12, 2015

How to start ASP.NET 5 Development on OS X Mac



It is the day when Microsoft @ BUILD conference in 2015 announced the availability of Visual Studio Code to allow OS X and Linux Developers to tap into .NET development

I am writing this blog post to show in step by step from ,net development perspective how to install and configure your macbook pro to have VS and starting developing and debugging asp.net applications.

Here is what you need to get you up and running:

1) Install Visual Studio Code: https://code.visualstudio.com/
It is a straight forward installation as we used for all MS products installation. Once you install it you will be able to run the VS Code as shown above.

2) Install Homebrew for managing missing packages for OS X:
You need to open the Terminal window and type (copy & paste) below command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This command install homebrew which is the missing package manager for OS X. It is same as Nuget console manager we do have in VS in windows to install any needed packages to our projects.

homebrew homepage url: http://brew.sh

Below screen shot show brew installation in the terminal window.


Once you hit enter, it will ask to enter your password and hit enter.
below show the completion of brew installation.



3) Install asp.net 5 and DNX:
Run the following 3 commands to install asp.net and DNX:

brew tap aspnet/dnx
brew update
brew install dnvm
Below screen shot shows the successful installation of DNX and ASP.NET on my macbook pro.



Now we have Mono, asp.net 5 is installed on our MacBook Pro! Hooray...

There is not further steps to do, but if you want to test compiling, debugging and running asp.net apps. You can install samples from github: https://github.com/aspnet/home#os-x

This sample contains console app, asp.net mvc and aspnet web app.
Below link shows you how to run the samples as well:
https://github.com/aspnet/home#running-the-samples

Hope this helps!