angular2, first commit
authorgustavo <gu.martinm@gmail.com>
Thu, 4 Feb 2016 00:25:14 +0000 (01:25 +0100)
committergustavo <gu.martinm@gmail.com>
Thu, 4 Feb 2016 00:25:14 +0000 (01:25 +0100)
angular2/showcase/README.md [new file with mode: 0644]
angular2/showcase/config.js [new file with mode: 0644]
angular2/showcase/index.html [new file with mode: 0644]
angular2/showcase/package.json [new file with mode: 0644]
angular2/showcase/src/app.js [new file with mode: 0644]
angular2/showcase/src/app.js.map [new file with mode: 0644]
angular2/showcase/src/app.ts [new file with mode: 0644]
angular2/showcase/src/tsconfig.json [new file with mode: 0644]
angular2/showcase/src/typings/angular2/angular2.d.ts [new file with mode: 0644]
angular2/showcase/src/typings/tsd.d.ts [new file with mode: 0644]
angular2/showcase/tsd.json [new file with mode: 0644]

diff --git a/angular2/showcase/README.md b/angular2/showcase/README.md
new file mode 100644 (file)
index 0000000..4000680
--- /dev/null
@@ -0,0 +1,16 @@
+* jspm install angular2 reflect-metadata es6-shim
+
+* jspm install typescript
+
+  jspm: creates config.js and fills jspm section in package.json file.
+
+* tsd init
+
+  tsd init: creates tsd.json file
+
+  change default path to src/typings
+  change default bundle to src/typings/tsd.d.ts
+
+* tsd query angular2 -s --action install
+
+  install typescript definitions for angular2 and save in tsd.json
diff --git a/angular2/showcase/config.js b/angular2/showcase/config.js
new file mode 100644 (file)
index 0000000..5fa8885
--- /dev/null
@@ -0,0 +1,294 @@
+System.config({
+  baseURL: "/",
+  defaultJSExtensions: true,
+  transpiler: "typescript",
+  paths: {
+    "github:*": "jspm_packages/github/*",
+    "npm:*": "jspm_packages/npm/*"
+  },
+
+  map: {
+    "angular2": "npm:angular2@2.0.0-alpha.42",
+    "es6-shim": "github:es-shims/es6-shim@0.33.6",
+    "immutable": "npm:immutable@3.7.5",
+    "reflect-metadata": "npm:reflect-metadata@0.1.2",
+    "text": "github:systemjs/plugin-text@0.0.2",
+    "typescript": "npm:typescript@1.6.2",
+    "zone.js": "npm:zone.js@0.5.8",
+    "github:jspm/nodelibs-assert@0.1.0": {
+      "assert": "npm:assert@1.3.0"
+    },
+    "github:jspm/nodelibs-buffer@0.1.0": {
+      "buffer": "npm:buffer@3.5.1"
+    },
+    "github:jspm/nodelibs-constants@0.1.0": {
+      "constants-browserify": "npm:constants-browserify@0.0.1"
+    },
+    "github:jspm/nodelibs-crypto@0.1.0": {
+      "crypto-browserify": "npm:crypto-browserify@3.10.0"
+    },
+    "github:jspm/nodelibs-events@0.1.1": {
+      "events": "npm:events@1.0.2"
+    },
+    "github:jspm/nodelibs-path@0.1.0": {
+      "path-browserify": "npm:path-browserify@0.0.0"
+    },
+    "github:jspm/nodelibs-process@0.1.2": {
+      "process": "npm:process@0.11.2"
+    },
+    "github:jspm/nodelibs-stream@0.1.0": {
+      "stream-browserify": "npm:stream-browserify@1.0.0"
+    },
+    "github:jspm/nodelibs-string_decoder@0.1.0": {
+      "string_decoder": "npm:string_decoder@0.10.31"
+    },
+    "github:jspm/nodelibs-util@0.1.0": {
+      "util": "npm:util@0.10.3"
+    },
+    "github:jspm/nodelibs-vm@0.1.0": {
+      "vm-browserify": "npm:vm-browserify@0.0.4"
+    },
+    "npm:angular2@2.0.0-alpha.42": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "fs": "github:jspm/nodelibs-fs@0.1.2",
+      "path": "github:jspm/nodelibs-path@0.1.0",
+      "process": "github:jspm/nodelibs-process@0.1.2",
+      "reflect-metadata": "npm:reflect-metadata@0.1.2",
+      "rx": "npm:rx@2.5.1",
+      "zone.js": "npm:zone.js@0.5.8"
+    },
+    "npm:asn1.js@2.2.1": {
+      "assert": "github:jspm/nodelibs-assert@0.1.0",
+      "bn.js": "npm:bn.js@2.2.0",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "inherits": "npm:inherits@2.0.1",
+      "minimalistic-assert": "npm:minimalistic-assert@1.0.0",
+      "vm": "github:jspm/nodelibs-vm@0.1.0"
+    },
+    "npm:assert@1.3.0": {
+      "util": "npm:util@0.10.3"
+    },
+    "npm:browserify-aes@1.0.5": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "buffer-xor": "npm:buffer-xor@1.0.3",
+      "cipher-base": "npm:cipher-base@1.0.1",
+      "create-hash": "npm:create-hash@1.1.2",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "evp_bytestokey": "npm:evp_bytestokey@1.0.0",
+      "fs": "github:jspm/nodelibs-fs@0.1.2",
+      "inherits": "npm:inherits@2.0.1",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:browserify-cipher@1.0.0": {
+      "browserify-aes": "npm:browserify-aes@1.0.5",
+      "browserify-des": "npm:browserify-des@1.0.0",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "evp_bytestokey": "npm:evp_bytestokey@1.0.0"
+    },
+    "npm:browserify-des@1.0.0": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "cipher-base": "npm:cipher-base@1.0.1",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "des.js": "npm:des.js@1.0.0",
+      "inherits": "npm:inherits@2.0.1"
+    },
+    "npm:browserify-rsa@2.0.1": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "constants": "github:jspm/nodelibs-constants@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "randombytes": "npm:randombytes@2.0.1"
+    },
+    "npm:browserify-sign@3.0.8": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "browserify-rsa": "npm:browserify-rsa@2.0.1",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "create-hash": "npm:create-hash@1.1.2",
+      "create-hmac": "npm:create-hmac@1.1.4",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "elliptic": "npm:elliptic@3.1.0",
+      "inherits": "npm:inherits@2.0.1",
+      "parse-asn1": "npm:parse-asn1@3.0.2",
+      "stream": "github:jspm/nodelibs-stream@0.1.0"
+    },
+    "npm:buffer-xor@1.0.3": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:buffer@3.5.1": {
+      "base64-js": "npm:base64-js@0.0.8",
+      "ieee754": "npm:ieee754@1.1.6",
+      "is-array": "npm:is-array@1.0.1"
+    },
+    "npm:cipher-base@1.0.1": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "inherits": "npm:inherits@2.0.1",
+      "stream": "github:jspm/nodelibs-stream@0.1.0",
+      "string_decoder": "github:jspm/nodelibs-string_decoder@0.1.0"
+    },
+    "npm:constants-browserify@0.0.1": {
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:core-util-is@1.0.1": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
+    },
+    "npm:create-ecdh@2.0.2": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "elliptic": "npm:elliptic@3.1.0"
+    },
+    "npm:create-hash@1.1.2": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "cipher-base": "npm:cipher-base@1.0.1",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "fs": "github:jspm/nodelibs-fs@0.1.2",
+      "inherits": "npm:inherits@2.0.1",
+      "ripemd160": "npm:ripemd160@1.0.1",
+      "sha.js": "npm:sha.js@2.4.4"
+    },
+    "npm:create-hmac@1.1.4": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "create-hash": "npm:create-hash@1.1.2",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "inherits": "npm:inherits@2.0.1",
+      "stream": "github:jspm/nodelibs-stream@0.1.0"
+    },
+    "npm:crypto-browserify@3.10.0": {
+      "browserify-cipher": "npm:browserify-cipher@1.0.0",
+      "browserify-sign": "npm:browserify-sign@3.0.8",
+      "create-ecdh": "npm:create-ecdh@2.0.2",
+      "create-hash": "npm:create-hash@1.1.2",
+      "create-hmac": "npm:create-hmac@1.1.4",
+      "diffie-hellman": "npm:diffie-hellman@3.0.2",
+      "inherits": "npm:inherits@2.0.1",
+      "pbkdf2": "npm:pbkdf2@3.0.4",
+      "public-encrypt": "npm:public-encrypt@2.0.1",
+      "randombytes": "npm:randombytes@2.0.1"
+    },
+    "npm:des.js@1.0.0": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "inherits": "npm:inherits@2.0.1",
+      "minimalistic-assert": "npm:minimalistic-assert@1.0.0"
+    },
+    "npm:diffie-hellman@3.0.2": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "miller-rabin": "npm:miller-rabin@2.0.1",
+      "randombytes": "npm:randombytes@2.0.1",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:elliptic@3.1.0": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "brorand": "npm:brorand@1.0.5",
+      "hash.js": "npm:hash.js@1.0.3",
+      "inherits": "npm:inherits@2.0.1",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:es6-promise@3.0.2": {
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:evp_bytestokey@1.0.0": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "create-hash": "npm:create-hash@1.1.2",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0"
+    },
+    "npm:hash.js@1.0.3": {
+      "inherits": "npm:inherits@2.0.1"
+    },
+    "npm:inherits@2.0.1": {
+      "util": "github:jspm/nodelibs-util@0.1.0"
+    },
+    "npm:miller-rabin@2.0.1": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "brorand": "npm:brorand@1.0.5"
+    },
+    "npm:parse-asn1@3.0.2": {
+      "asn1.js": "npm:asn1.js@2.2.1",
+      "browserify-aes": "npm:browserify-aes@1.0.5",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "create-hash": "npm:create-hash@1.1.2",
+      "evp_bytestokey": "npm:evp_bytestokey@1.0.0",
+      "pbkdf2": "npm:pbkdf2@3.0.4",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:path-browserify@0.0.0": {
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:pbkdf2@3.0.4": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "child_process": "github:jspm/nodelibs-child_process@0.1.0",
+      "create-hmac": "npm:create-hmac@1.1.4",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "path": "github:jspm/nodelibs-path@0.1.0",
+      "process": "github:jspm/nodelibs-process@0.1.2",
+      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+    },
+    "npm:process@0.11.2": {
+      "assert": "github:jspm/nodelibs-assert@0.1.0"
+    },
+    "npm:public-encrypt@2.0.1": {
+      "bn.js": "npm:bn.js@2.2.0",
+      "browserify-rsa": "npm:browserify-rsa@2.0.1",
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "create-hash": "npm:create-hash@1.1.2",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "parse-asn1": "npm:parse-asn1@3.0.2",
+      "randombytes": "npm:randombytes@2.0.1"
+    },
+    "npm:randombytes@2.0.1": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:readable-stream@1.1.13": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "core-util-is": "npm:core-util-is@1.0.1",
+      "events": "github:jspm/nodelibs-events@0.1.1",
+      "inherits": "npm:inherits@2.0.1",
+      "isarray": "npm:isarray@0.0.1",
+      "process": "github:jspm/nodelibs-process@0.1.2",
+      "stream-browserify": "npm:stream-browserify@1.0.0",
+      "string_decoder": "npm:string_decoder@0.10.31"
+    },
+    "npm:reflect-metadata@0.1.2": {
+      "assert": "github:jspm/nodelibs-assert@0.1.0",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:ripemd160@1.0.1": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:rx@2.5.1": {
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:sha.js@2.4.4": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+      "fs": "github:jspm/nodelibs-fs@0.1.2",
+      "inherits": "npm:inherits@2.0.1",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:stream-browserify@1.0.0": {
+      "events": "github:jspm/nodelibs-events@0.1.1",
+      "inherits": "npm:inherits@2.0.1",
+      "readable-stream": "npm:readable-stream@1.1.13"
+    },
+    "npm:string_decoder@0.10.31": {
+      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
+    },
+    "npm:util@0.10.3": {
+      "inherits": "npm:inherits@2.0.1",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    },
+    "npm:vm-browserify@0.0.4": {
+      "indexof": "npm:indexof@0.0.1"
+    },
+    "npm:zone.js@0.5.8": {
+      "es6-promise": "npm:es6-promise@3.0.2",
+      "process": "github:jspm/nodelibs-process@0.1.2"
+    }
+  }
+});
diff --git a/angular2/showcase/index.html b/angular2/showcase/index.html
new file mode 100644 (file)
index 0000000..223aadc
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+
+<head>
+    <title>Angular 2 Quickstart</title>
+    <script src="jspm_packages/system.js"></script>
+    <script src="config.js"></script>
+</head>
+
+<body>
+    Angular 2 Quickstart
+    <my-app></my-app>
+    <script>
+        System.import('./src/app');
+    </script>
+</body>
+
+</html>
diff --git a/angular2/showcase/package.json b/angular2/showcase/package.json
new file mode 100644 (file)
index 0000000..a55b223
--- /dev/null
@@ -0,0 +1,32 @@
+{
+  "name": "showcase",
+  "version": "0.0.1",
+  "description": "My showcase module",
+  "author": {
+    "name": "Gustavo Martin Morcuende",
+    "email": "noemail@noemail.invalid",
+    "url": "http://gumartinm.name"
+  },
+  "homepage": "http://gumartinm.name",
+  "license": "Apache-2.0",
+  "scripts": {
+    "build": "tsc -w"
+  },
+  "devDependencies": {
+    "tsd": "~0.6.5",
+    "typescript": "~1.6.2"
+  },
+  "jspm": {
+    "dependencies": {
+      "angular2": "npm:angular2@^2.0.0-alpha.42",
+      "es6-shim": "github:es-shims/es6-shim@^0.33.6",
+      "immutable": "npm:immutable@^3.7.5",
+      "reflect-metadata": "npm:reflect-metadata@^0.1.2",
+      "text": "github:systemjs/plugin-text@^0.0.2",
+      "zone.js": "npm:zone.js@^0.5.8"
+    },
+    "devDependencies": {
+      "typescript": "npm:typescript@^1.6.2"
+    }
+  }
+}
diff --git a/angular2/showcase/src/app.js b/angular2/showcase/src/app.js
new file mode 100644 (file)
index 0000000..c634987
--- /dev/null
@@ -0,0 +1,43 @@
+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);
+};System.register(['reflect-metadata', 'es6-shim', 'angular2/angular2'], function(exports_1) {
+    var angular2_1;
+    var MyAppComponent;
+    return {
+        setters:[
+            function (_) {},
+            function (_) {},
+            function (_angular2_1) {
+                angular2_1 = _angular2_1;
+            }],
+        execute: function() {
+            // Annotation section
+            MyAppComponent = (function () {
+                function MyAppComponent() {
+                    this.name = 'Alice';
+                }
+                MyAppComponent = __decorate([
+                    angular2_1.Component({
+                        selector: 'my-app'
+                    }),
+                    angular2_1.View({
+                        template: '<h1>Hello {{ name }}</h1>'
+                    }), 
+                    __metadata('design:paramtypes', [])
+                ], MyAppComponent);
+                return MyAppComponent;
+            })();
+            exports_1("MyAppComponent", MyAppComponent);
+            angular2_1.bootstrap(MyAppComponent);
+        }
+    }
+});
+//# sourceMappingURL=app.js.map
\ No newline at end of file
diff --git a/angular2/showcase/src/app.js.map b/angular2/showcase/src/app.js.map
new file mode 100644 (file)
index 0000000..b102296
--- /dev/null
@@ -0,0 +1 @@
+{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":["MyAppComponent","MyAppComponent.constructor"],"mappings":";;;;;;;;;;;;;;;;;;;;;YAOA,AADA,qBAAqB;;gBAUjBA;oBACIC,IAAIA,CAACA,IAAIA,GAAGA,OAAOA,CAACA;gBACxBA,CAACA;gBAXLD;oBAACA,oBAASA,CAACA;wBACPA,QAAQA,EAAEA,QAAQA;qBACrBA,CAACA;oBACDA,eAAIA,CAACA;wBACFA,QAAQA,EAAEA,2BAA2BA;qBACxCA,CAACA;;mCAODA;gBAADA,qBAACA;YAADA,CAACA,AAZD,IAYC;YAZD,2CAYC,CAAA;YAED,oBAAS,CAAC,cAAc,CAAC,CAAC"}
\ No newline at end of file
diff --git a/angular2/showcase/src/app.ts b/angular2/showcase/src/app.ts
new file mode 100644 (file)
index 0000000..0d05103
--- /dev/null
@@ -0,0 +1,22 @@
+// import 'zone.js';
+import 'reflect-metadata';
+import 'es6-shim';
+
+import {Component, View, bootstrap} from 'angular2/angular2';
+
+// Annotation section
+@Component({
+    selector: 'my-app'
+})
+@View({
+    template: '<h1>Hello {{ name }}</h1>'
+})
+// Component controller
+export class MyAppComponent {
+    name: string;
+    constructor() {
+        this.name = 'Alice';
+    }
+}
+
+bootstrap(MyAppComponent);
diff --git a/angular2/showcase/src/tsconfig.json b/angular2/showcase/src/tsconfig.json
new file mode 100644 (file)
index 0000000..7881759
--- /dev/null
@@ -0,0 +1,11 @@
+{
+       "compilerOptions": {
+               "module": "system",
+               "target": "ES5",
+               "sourceMap": true,
+               "noImplicitAny": true,
+               "emitDecoratorMetadata": true,
+               "experimentalDecorators": true,
+               "removeComments": false
+       }
+}
\ No newline at end of file
diff --git a/angular2/showcase/src/typings/angular2/angular2.d.ts b/angular2/showcase/src/typings/angular2/angular2.d.ts
new file mode 100644 (file)
index 0000000..3560809
--- /dev/null
@@ -0,0 +1,13 @@
+// Type definitions for Angular 2
+// Project: http://angular.io/
+// Definitions by: angular team <https://github.com/angular/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+// Angular 2 distributes typings in our NPM package.
+// To get the typings, simply:
+// $ npm install angular2
+// and use TypeScript 1.6.2 or later.
+//
+// Note that TypeScript must be configured with
+// --moduleResolution node
+// which is the default when --module commonjs
diff --git a/angular2/showcase/src/typings/tsd.d.ts b/angular2/showcase/src/typings/tsd.d.ts
new file mode 100644 (file)
index 0000000..e5b2e14
--- /dev/null
@@ -0,0 +1 @@
+/// <reference path="angular2/angular2.d.ts" />
diff --git a/angular2/showcase/tsd.json b/angular2/showcase/tsd.json
new file mode 100644 (file)
index 0000000..51a8b8b
--- /dev/null
@@ -0,0 +1,12 @@
+{
+  "version": "v4",
+  "repo": "borisyankov/DefinitelyTyped",
+  "ref": "master",
+  "path": "src/typings",
+  "bundle": "src/typings/tsd.d.ts",
+  "installed": {
+    "angular2/angular2.d.ts": {
+      "commit": "62eedc3121a5e28c50473d2e4a9cefbcb9c3957f"
+    }
+  }
+}