https://github.com/mizrael/angularjs2-typescript
This repo will serve as a template for a basic AngularJS 2 project written in Typescript.
https://github.com/mizrael/angularjs2-typescript
Last synced: 4 months ago
JSON representation
This repo will serve as a template for a basic AngularJS 2 project written in Typescript.
- Host: GitHub
- URL: https://github.com/mizrael/angularjs2-typescript
- Owner: mizrael
- Created: 2016-08-22T22:03:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-22T22:15:34.000Z (about 9 years ago)
- Last Synced: 2025-02-03T00:26:47.440Z (8 months ago)
- Language: JavaScript
- Size: 6.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Introduction
This repo will serve as a template for a basic AngularJS 2 project written in Typescript.
Gulp is configured to watch the .ts files and transpile them if a change occurs.
At the end of the first build, a simple webserver is created, pointing ad the /www/ folder.
# Prerequisites
* execute the following commands:
```
sudo npm install -g typescript
sudo npm install -g typings
sudo npm install -g gulp
```# Initialization
* create project folder and enter it
* execute the following commands:```
tsc --init --target es5 --sourceMap --experimentalDecorators --emitDecoratorMetadata
typings install dt~es6-shim --global --save
```* Add typings.json file to the project folder with the following content:
```
{
"ambientDependencies":
{
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2"
}
}
```* execute the following commands:
```
npm init
npm install angular2 --save
npm install systemjs --save
npm install typings --save-dev
npm install gulp --save --save-dev
npm install del --save-dev
npm install gulp-typescript --save-dev
npm install gulp-concat --save-dev
npm install gulp-webserver --save-dev
npm install gulp-sourcemaps --save-dev
sudo typings install
```* edit the package.json file and set gulpfile.js as "main"
```
"main": "gulpfile.js":
```# Run the build task
in Visual Studio Code (on Mac): cmd + shift + b