From 4fa442e2622935c9075f06ad1433396f0be9308c Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 6 Jun 2016 15:56:19 +0200 Subject: [PATCH] set up a first draft of the angular2 scaffold --- .gitignore | 3 +++ app/app.component.ts | 11 +++++++++++ app/main.ts | 5 +++++ index.html | 39 ++++++++++++++++++++++++------------ systemjs.config.js | 47 ++++++++++++++++++++++++++++++++++++++++++++ tsconfig.json | 12 +++++++++++ typings.json | 7 +++++++ 7 files changed, 111 insertions(+), 13 deletions(-) create mode 100644 app/app.component.ts create mode 100644 app/main.ts create mode 100644 systemjs.config.js create mode 100644 tsconfig.json create mode 100644 typings.json diff --git a/.gitignore b/.gitignore index 09d1d0a..d22d33e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ *.iml atlassian-ide-plugin.xml node_modules/ +typings/ +app/**/*.js +app/**/*.js.map \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts new file mode 100644 index 0000000..0ea17ab --- /dev/null +++ b/app/app.component.ts @@ -0,0 +1,11 @@ +import { Component } from "@angular/core"; + +@Component({ + "selector":"dencode-app", + "template": ` +

dencode.org

+ ` +}) +export class AppComponent { + +} diff --git a/app/main.ts b/app/main.ts new file mode 100644 index 0000000..04cabf1 --- /dev/null +++ b/app/main.ts @@ -0,0 +1,5 @@ +import {bootstrap} from "@angular/platform-browser-dynamic"; + +import {AppComponent} from "./app.component"; + +bootstrap(AppComponent); diff --git a/index.html b/index.html index dadf298..d469d4c 100644 --- a/index.html +++ b/index.html @@ -1,19 +1,32 @@ - - - Decode? Encode? DENcode! - - - - - + + + Decode? Encode? DENcode! + + + + + + + + + + + + -

Decode? Encode? DENcode!

- +

Decode? Encode? DENcode!

+ +Please hold on, we're starting the turbines ... - \ No newline at end of file + diff --git a/systemjs.config.js b/systemjs.config.js new file mode 100644 index 0000000..4ea7cf2 --- /dev/null +++ b/systemjs.config.js @@ -0,0 +1,47 @@ +/** + * System configuration for Angular 2 samples + * Adjust as necessary for your application needs. + */ +(function(global) { + // map tells the System loader where to look for things + var map = { + 'app': 'app', // 'dist', + '@angular': 'node_modules/@angular', +// 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api', + 'rxjs': 'node_modules/rxjs' + }; + // packages tells the System loader how to load when no filename and/or no extension + var packages = { + 'app': { main: 'main.js', defaultExtension: 'js' }, + 'rxjs': { defaultExtension: 'js' }, +// 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' }, + }; + var ngPackageNames = [ + 'common', + 'compiler', + 'core', + 'http', + 'platform-browser', + 'platform-browser-dynamic', + 'router', + 'router-deprecated', + 'upgrade', + ]; + // Individual files (~300 requests): + function packIndex(pkgName) { + packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' }; + } + // Bundled (~40 requests): + function packUmd(pkgName) { + packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' }; + }; + // Most environments should use UMD; some (Karma) need the individual index files + var setPackageConfig = System.packageWithIndex ? packIndex : packUmd; + // Add package entries for angular packages + ngPackageNames.forEach(setPackageConfig); + var config = { + map: map, + packages: packages + } + System.config(config); +})(this); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e6a6eac --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "removeComments": false, + "noImplicitAny": false + } +} diff --git a/typings.json b/typings.json new file mode 100644 index 0000000..192935f --- /dev/null +++ b/typings.json @@ -0,0 +1,7 @@ +{ + "globalDependencies": { + "core-js": "registry:dt/core-js#0.0.0+20160317120654", + "jasmine": "registry:dt/jasmine#2.2.0+20160505161446", + "node": "registry:dt/node#4.0.0+20160509154515" + } +} \ No newline at end of file