-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules/ | ||
node_modules/ | ||
.idea/ | ||
**/typings/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
# firstTsNgApp | ||
This is for test purpose | ||
|
||
Prerequisites: | ||
- install node | ||
- install typescript: npm install -g typescript | ||
- install tsd package manager: npm install -g tsd | ||
- install a node static server (for this project specific): npm install -g live-server | ||
|
||
To be able to run the application: | ||
- mkdir <dir> & cd <dir> | ||
- git checkout https://github.com/capoli/firstTsNgApp.git | ||
- npm install | ||
- cd src | ||
- tsd install | ||
*** if tsd.json is missing execute form the src folder following command: | ||
*** - tsd install angular2 es6-promise rx rx-lite --save | ||
|
||
tsconfig schema: http://json.schemastore.org/tsconfig | ||
|
||
To compile Typescript to Javascript execute from the root of the application folder: | ||
- tsc -p src -w | ||
*** this is to generate a .js file (and a .map.js file, helps debugger to navigate between js and ts) from a .ts file | ||
*** with -w it will automatically watch for changes and recompile | ||
|
||
To run the application execute from the root of the application folder: | ||
live-server --open=src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../node_modules/traceur/bin/traceur-runtime.js"></script> | ||
<script src="../node_modules/es6-module-loader/dist/es6-module-loader.js"></script> | ||
<script src="../node_modules/systemjs/dist/system.src.js"></script> | ||
<script src="../node_modules/angular2/bundles/angular2.dev.js"></script> | ||
</head> | ||
<body> | ||
<my-app></my-app> | ||
<script> | ||
System.import('js/app'); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc); | ||
switch (arguments.length) { | ||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); | ||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); | ||
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); | ||
} | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var angular2_1 = require('angular2/angular2'); | ||
var AppComponent = (function () { | ||
function AppComponent() { | ||
} | ||
AppComponent = __decorate([ | ||
angular2_1.Component({ | ||
selector: 'my-app' | ||
}), | ||
angular2_1.View({ | ||
template: '<h1 id="output">My fourth Angular 2 App</h1>' | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], AppComponent); | ||
return AppComponent; | ||
})(); | ||
angular2_1.bootstrap(AppComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Component, View, bootstrap} from 'angular2/angular2'; | ||
|
||
@Component({ | ||
selector: 'my-app' | ||
}) | ||
@View({ | ||
template: '<h1 id="output">My fourth Angular 2 App</h1>' | ||
}) | ||
|
||
class AppComponent { } | ||
|
||
bootstrap(AppComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES5", | ||
"module": "commonjs", | ||
"sourceMap": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"outDir":"js", | ||
"rootDir":"ts", | ||
"sourceMap":false, | ||
"removeComments":true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": "v4", | ||
"repo": "borisyankov/DefinitelyTyped", | ||
"ref": "master", | ||
"path": "typings", | ||
"bundle": "typings/tsd.d.ts", | ||
"installed": { | ||
"es6-promise/es6-promise.d.ts": { | ||
"commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" | ||
}, | ||
"rx/rx.d.ts": { | ||
"commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" | ||
}, | ||
"angular2/angular2.d.ts": { | ||
"commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" | ||
}, | ||
"rx/rx-lite.d.ts": { | ||
"commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" | ||
} | ||
} | ||
} |
Empty file.