# Getting Started

## Setting Up Development Environment

To setup a new project we need to create `package.json`

```javascript
{
  "scripts": {
    "build": "tsc",
    "typings:install": "typings install"
  },
  "dependencies": {
    "backbone": "^1.3.3",
    "underscore": "^1.8.3",
    "backbone.nativeview": "^0.3.3",
    "es6-shim": "github:paulmillr/es6-shim",
    "ng-backbone": "^0.1.5",
    "systemjs": "^0.19.36",
    "typescript": "^1.8.10"
  }
}
```

Now we can install dependencies

```
npm install
```

and required TypeScript definitions

```
npm run typings:install
```

We also need to tell TypeScript how exactly we want it to transpile our sources, so we create `tsconfig.json`

```
{
  "compilerOptions": {
    "target": "ES5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": true,
    "outDir": "build/"
  },
  "files": [
    "./typings/index.d.ts",
    "./src/app.ts"
  ]
}
```

In brief, we ask here TypeScript to compile our application bootstrap module `./src/app.ts` into `./build` directory. Also it shall also include index file`./typings/index.d.ts` for installed type definitions.

Now we are ready to write application code. Of course you can use any text editor, but for any pleasant experience you rather take an [IDE with support for TypeScript ](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support)

I'm personally used to [NetBeans](https://netbeans.org/), which is out of the list. Yet it has a plugin [Netbeans TypeScript Editor](https://github.com/Everlaw/nbts).

![](https://265109865-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-wwTI6fjCWU9_0%2F-LdyKJXH0z26CupROfdA%2F-LdyKL94JhFROsprA7Q1%2Fide.PNG?generation=1556897687033500\&alt=media)
