GithubHelp home page GithubHelp logo

hola_mundo_ts's Introduction

Hello World in TypeScript

Create a "Hello World" project in TypeScript using WebStorm IDE from JetBrains.


Setup

1 Install npm: Node Package Manager: Manejador de paquetes

$ sudo apt install npm

2 Create a project

  • IDE: WebStorm

File >New>Project>Empty: hello_world_ts

3 Open terminal and go to project root

$ cd ~/hello_world_ts

4 Configure npm to create package.json

$ npm init

Fill information

5 Install TypeScript with npm

$ npm install typescript --save-dev

6 Add plugin ignore (optional)

Settings > Plugins > Marketplace: ignore (restart requeried)

7 Install ts-node to run typescript as tests inside WebStorm

$ npm install ts-node --save-dev

8 Install test suite "mocha"

$ npm install mocha --save-dev

9 Add types mocha and node

$ npm install @types/mocha --save-dev
$ npm install @types/node --save-dev

Compile

From command line

$ cd source
$ tsc
$ cd ..
$ tsc --watch

From tool window

  1. Open source/index.ts file
  2. In the bottom toolbar shoud appear "TypeScript 3.x.x" window
  3. In TypeScript window click the hammer>Compile All

From Project window

  1. Right click tsconfig.json file
  2. Click "Compile Typescript"

Run

  1. Right click tests/index.ts
  2. Run 'index.ts'

hola_mundo_ts's People

Contributors

spjuanjoc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.