Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 3683104

Browse files
committed
updated to work with the latest jspm
1 parent b808795 commit 3683104

File tree

5 files changed

+46
-7
lines changed

5 files changed

+46
-7
lines changed

jspm/config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
System.config({
2+
"baseURL": "/",
3+
"defaultJSExtensions": true,
4+
"transpiler": "typescript",
5+
"paths": {
6+
"*": "src/*",
7+
"src": "src",
8+
"github:*": "jspm_packages/github/*",
9+
"npm:*": "jspm_packages/npm/*"
10+
},
11+
"packages": {
12+
"src": {
13+
"defaultExtension": "ts"
14+
}
15+
}
16+
});
17+
18+
System.config({
19+
"map": {
20+
"core-js": "npm:[email protected]",
21+
"typescript": "github:mhegazy/[email protected]",
22+
"github:jspm/[email protected]": {
23+
"process": "npm:[email protected]"
24+
},
25+
26+
"fs": "github:jspm/[email protected]",
27+
"process": "github:jspm/[email protected]",
28+
"systemjs-json": "github:systemjs/[email protected]"
29+
}
30+
}
31+
});
32+

jspm/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
<body>
88
<div id="content"></div>
99
<script>
10-
System.config({
11-
"paths": {
12-
"app.js":"app.ts",
13-
"greeter.js":"greeter.ts"
14-
}
15-
});
1610
System.import('app').then(function(m) {
1711
var element = document.getElementById("content");
1812
m.main(element);

jspm/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"jspm": {
3+
"directories": {},
4+
"dependencies": {
5+
"core-js": "npm:core-js@^0.9.4"
6+
},
7+
"devDependencies": {
8+
"typescript": "github:mhegazy/[email protected]"
9+
}
10+
}
11+
}
File renamed without changes.

jspm/greeter.ts renamed to jspm/src/greeter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import repeat from "core-js/library/fn/string/repeat"
2+
13
export class Greeter
24
{
35
element: HTMLElement;
@@ -15,7 +17,7 @@ export class Greeter
1517

1618
start()
1719
{
18-
this.timerToken = setInterval(() => this.span.innerText = new Date().toUTCString(), 500);
20+
this.timerToken = setInterval(() => this.span.innerText = `"${repeat(new Date().toUTCString() + " ", 2)}"`, 500);
1921
}
2022

2123
stop()

0 commit comments

Comments
 (0)