A dhis deployable sample app
authorErik Haider Forsén <erik@forsen.not>
Sat, 31 Oct 2015 15:58:13 +0000 (16:58 +0100)
committerErik Haider Forsén <erik@forsen.not>
Sat, 31 Oct 2015 15:58:13 +0000 (16:58 +0100)
manifest.webapp [new file with mode: 0644]
package.json
src/app/app.ts [new file with mode: 0644]
src/index.html [new file with mode: 0644]
src/tsconfig.json [new file with mode: 0644]

diff --git a/manifest.webapp b/manifest.webapp
new file mode 100644 (file)
index 0000000..2e95734
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "version":"0.1",
+  "name": "FRM",
+  "description": "Sample app",
+  "launch_path": "src/index.html",
+  "icons":{
+    "16":null,
+    "48":null,
+    "128":null
+  },
+  "developer": {
+    "name": "Group FRM",
+    "url": "https://wiki.uio.no/mn/ifi/inf5750/index.php/FRM"
+  },
+  "default_locale": "en",
+  "activities": {
+    "dhis": {
+      "href": "*"
+    }
+  }
+}
index 789e619..6dd73f0 100644 (file)
@@ -4,7 +4,8 @@
   "description": "",
   "main": "index.js",
   "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
+    "tsc": "tsc -p src -w",
+    "start": "live-server --open=src"
   },
   "repository": {
     "type": "git",
diff --git a/src/app/app.ts b/src/app/app.ts
new file mode 100644 (file)
index 0000000..017f417
--- /dev/null
@@ -0,0 +1,13 @@
+import {bootstrap, Component} from 'angular2/angular2';
+
+@Component({
+    selector: 'hello-world',
+    template: `
+        <h1>Hello World</h1>
+        <p>This is just a sample template yeah!</p>
+    `
+})
+class Hello {}
+
+bootstrap(Hello);
+
diff --git a/src/index.html b/src/index.html
new file mode 100644 (file)
index 0000000..189f0fb
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Sample App</title>
+    <script src="../node_modules/systemjs/dist/system.src.js"></script>
+    <script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
+    <script>
+        System.config({
+            packages: {'app': {defaultExtension: 'js'}}
+        });
+        System.import('app/app');
+    </script>
+</head>
+<body>
+    <hello-world>loading...</hello-world>
+</body>
+</html>
diff --git a/src/tsconfig.json b/src/tsconfig.json
new file mode 100644 (file)
index 0000000..7e4317c
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "compilerOptions": {
+    "target": "ES5",
+    "module": "commonjs",
+    "sourceMap": true,
+    "emitDecoratorMetadata": true,
+    "experimentalDecorators": true,
+    "removeComments": false,
+    "noImplicitAny": false
+  }
+}