Skip to content

Commit 30e12fc

Browse files
committed
cleaning scripts & jspm config
updated typings dep
1 parent 6deee85 commit 30e12fc

File tree

8 files changed

+70
-83
lines changed

8 files changed

+70
-83
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ node_modules
3030
jspm_packages
3131
typings
3232
dist/app.js
33+
out

dist/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="description" content="">
77
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
8-
<title>react / ts / jspm - starter kit</title>
8+
<title>React / TypeScript / JSPM - Starter-Kit</title>
99
<link rel="stylesheet" href="loader-style.css">
1010
</head>
1111

@@ -27,14 +27,14 @@
2727
</div>
2828
<!-- body bottom scripts -->
2929
<script src="/jspm_packages/system.js"></script>
30-
<script src="/jspm.browser.js"></script>
3130
<script src="/jspm.config.js"></script>
3231
<script type="text/javascript">
3332
System.import('systemjs-hot-reloader').then(function(HotReloader) {
3433
// if you're running server on custom port please remember to update below
3534
new HotReloader.default('http://localhost:8888');
3635
});
3736
// load main module of your app
37+
System.trace = true;
3838
System.import('src/app');
3939
</script>
4040
</body>

jspm.browser.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

jspm.config.js

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
SystemJS.config({
2+
paths: {
3+
"github:": "jspm_packages/github/",
4+
"npm:": "jspm_packages/npm/",
5+
"app/": "src/"
6+
},
7+
browserConfig: {
8+
"baseURL": "."
9+
},
10+
devConfig: {
11+
"map": {
12+
"plugin-typescript": "github:frankwallis/plugin-typescript@4.0.16",
13+
"systemjs-hot-reloader": "github:capaj/systemjs-hot-reloader@0.6.0"
14+
},
15+
"packages": {
16+
"github:frankwallis/plugin-typescript@4.0.16": {
17+
"map": {
18+
"typescript": "npm:typescript@1.8.10"
19+
}
20+
},
21+
"github:capaj/systemjs-hot-reloader@0.6.0": {
22+
"map": {
23+
"debug": "npm:debug@2.2.0",
24+
"weakee": "npm:weakee@1.0.0",
25+
"socket.io-client": "github:socketio/socket.io-client@1.4.6"
26+
}
27+
},
28+
"npm:debug@2.2.0": {
29+
"map": {
30+
"ms": "npm:ms@0.7.1"
31+
}
32+
}
33+
}
34+
},
235
transpiler: "plugin-typescript",
336
typescriptOptions: {
437
"target": "es5",
@@ -10,8 +43,9 @@ SystemJS.config({
1043
},
1144
packages: {
1245
"app": {
13-
"main": "main.tsx",
46+
"main": "app.tsx",
1447
"defaultExtension": "tsx",
48+
"format": "esm",
1549
"meta": {
1650
"*.tsx": {
1751
"loader": "plugin-typescript"
@@ -31,8 +65,7 @@ SystemJS.config({
3165
"assert": "github:jspm/nodelibs-assert@0.2.0-alpha",
3266
"buffer": "github:jspm/nodelibs-buffer@0.2.0-alpha",
3367
"child_process": "github:jspm/nodelibs-child_process@0.2.0-alpha",
34-
"clean-css": "npm:clean-css@3.4.10",
35-
"css": "github:systemjs/plugin-css@0.1.20",
68+
"css": "github:systemjs/plugin-css@0.1.23",
3669
"events": "github:jspm/nodelibs-events@0.2.0-alpha",
3770
"fs": "github:jspm/nodelibs-fs@0.2.0-alpha",
3871
"http": "github:jspm/nodelibs-http@0.2.0-alpha",
@@ -41,29 +74,15 @@ SystemJS.config({
4174
"net": "github:jspm/nodelibs-net@0.2.0-alpha",
4275
"os": "github:jspm/nodelibs-os@0.2.0-alpha",
4376
"path": "github:jspm/nodelibs-path@0.2.0-alpha",
44-
"plugin-typescript": "github:frankwallis/plugin-typescript@4.0.2",
4577
"process": "github:jspm/nodelibs-process@0.2.0-alpha",
4678
"react": "npm:react@0.14.7",
4779
"react-dom": "npm:react-dom@0.14.7",
4880
"stream": "github:jspm/nodelibs-stream@0.2.0-alpha",
49-
"systemjs-hot-reloader": "github:capaj/systemjs-hot-reloader@0.5.6",
5081
"tty": "github:jspm/nodelibs-tty@0.2.0-alpha",
5182
"url": "github:jspm/nodelibs-url@0.2.0-alpha",
5283
"util": "github:jspm/nodelibs-util@0.2.0-alpha"
5384
},
5485
packages: {
55-
"github:capaj/systemjs-hot-reloader@0.5.6": {
56-
"map": {
57-
"debug": "npm:debug@2.2.0",
58-
"socket.io-client": "github:socketio/socket.io-client@1.4.5",
59-
"weakee": "npm:weakee@1.0.0"
60-
}
61-
},
62-
"github:frankwallis/plugin-typescript@4.0.2": {
63-
"map": {
64-
"typescript": "npm:typescript@1.8.7"
65-
}
66-
},
6786
"github:jspm/nodelibs-buffer@0.2.0-alpha": {
6887
"map": {
6988
"buffer-browserify": "npm:buffer@4.5.0"
@@ -96,22 +115,6 @@ SystemJS.config({
96115
"isarray": "npm:isarray@1.0.0"
97116
}
98117
},
99-
"npm:clean-css@3.4.10": {
100-
"map": {
101-
"commander": "npm:commander@2.8.1",
102-
"source-map": "npm:source-map@0.4.4"
103-
}
104-
},
105-
"npm:commander@2.8.1": {
106-
"map": {
107-
"graceful-readlink": "npm:graceful-readlink@1.0.1"
108-
}
109-
},
110-
"npm:debug@2.2.0": {
111-
"map": {
112-
"ms": "npm:ms@0.7.1"
113-
}
114-
},
115118
"npm:react@0.14.7": {
116119
"map": {
117120
"fbjs": "npm:fbjs@0.6.1"
@@ -127,11 +130,6 @@ SystemJS.config({
127130
"util-deprecate": "npm:util-deprecate@1.0.2"
128131
}
129132
},
130-
"npm:source-map@0.4.4": {
131-
"map": {
132-
"amdefine": "npm:amdefine@1.0.0"
133-
}
134-
},
135133
"npm:stream-browserify@2.0.1": {
136134
"map": {
137135
"inherits": "npm:inherits@2.0.1",

package.json

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,35 @@
1212
"postinstall": "jspm install && typings install",
1313
"precommit": "npm run lint",
1414
"prepush": "npm run lint && npm test",
15-
"build-test": "jspm build src/main dist/app.js",
16-
"build-prod": "jspm build src/main dist/app.js --minify --skip-source-maps",
1715
"bundle-dev": "./node_modules/.bin/jspm bundle dev-bundle.config.js out/dev-bundle.js -id",
1816
"unbundle": "./node_modules/.bin/jspm unbundle",
19-
"bundle-deps": "./node_modules/.bin/jspm bundle react + react-dom + mobx + mobx-react dist/deps-bundle.js --minify --skip-source-maps",
20-
"bundle-app": "./node_modules/.bin/jspm bundle src/app - react-dom - mobx - mobx-react dist/app.js --minify --skip-source-maps",
21-
"bundle-app-debug": "./node_modules/.bin/jspm bundle src/app - react-dom - mobx - mobx-react dist/app.js",
17+
"bundle-deps": "./node_modules/.bin/jspm bundle react + react-dom dist/deps-bundle.js --minify --skip-source-maps",
18+
"bundle-app": "./node_modules/.bin/jspm bundle src/app - react-dom dist/app-bundle.js --minify --skip-source-maps",
19+
"bundle-app-debug": "./node_modules/.bin/jspm bundle src/app - react-dom dist/app-bundle.js",
2220
"build": "npm run bundle-app && npm run regenerator",
2321
"build-deps": "npm run unbundle && cp jspm_packages/system.js dist/ && cp jspm.config.js dist/ && npm run bundle-deps && npm run bundle-dev",
24-
"regenerator": "cd out && cp ../dist/app.js . && regenerator -r app.js > app.regenerator.js && cp app.regenerator.js ../dist/app.js",
25-
"init-deploy": "mkdir dist && git clone https://github.com/piotrwitek/training-management-tool --branch gh-pages dist",
22+
"regenerator": "cd out && cp ../dist/app-bundle.js . && regenerator -r app-bundle.js > app-bundle.regenerator.js && cp app-bundle.regenerator.js ../dist/app-bundle.js",
23+
"init-deploy": "mkdir dist && git clone https://github.com/piotrwitek/react-ts-jspm-starter-kit --branch gh-pages dist",
2624
"deploy": "cd dist && git checkout gh-pages && git add --all && git commit -m \"New Release\" && git push",
2725
"bd": "npm run build && npm run deploy",
2826
"bdd": "npm run build-deps && npm run deploy",
29-
"test": "jspm run ./tests/run-tests.ts",
27+
"test": "echo \"Tests to be added soon!\"",
3028
"lint": "tslint ./src/**/*.ts*"
3129
},
3230
"devDependencies": {
3331
"husky": "^0.11.4",
3432
"jspm": "^0.17.0-beta.22",
3533
"jspm-hmr": "^0.4.1",
3634
"regenerator": "^0.8.46",
37-
"typings": "^0.7.12"
35+
"typings": "^1.3.1"
3836
},
3937
"jspm": {
4038
"name": "app",
4139
"dependencies": {
42-
"css": "github:systemjs/plugin-css@^0.1.20",
43-
"react": "npm:react@^0.14.7",
40+
"css": "github:systemjs/plugin-css@^0.1.23",
4441
"react-dom": "npm:react-dom@^0.14.7"
4542
},
4643
"devDependencies": {
47-
"clean-css": "npm:clean-css@^3.4.10",
4844
"plugin-typescript": "github:frankwallis/plugin-typescript@^4.0.2",
4945
"systemjs-hot-reloader": "github:capaj/systemjs-hot-reloader@^0.5.6"
5046
},
@@ -61,12 +57,27 @@
6157
"os": "github:jspm/nodelibs-os@^0.2.0-alpha",
6258
"path": "github:jspm/nodelibs-path@^0.2.0-alpha",
6359
"process": "github:jspm/nodelibs-process@^0.2.0-alpha",
60+
"react": "npm:react@^0.14.7",
6461
"stream": "github:jspm/nodelibs-stream@^0.2.0-alpha",
6562
"tty": "github:jspm/nodelibs-tty@^0.2.0-alpha",
6663
"url": "github:jspm/nodelibs-url@^0.2.0-alpha",
6764
"util": "github:jspm/nodelibs-util@^0.2.0-alpha"
6865
},
6966
"overrides": {
67+
"npm:debug@2.2.0": {
68+
"main": "browser.js",
69+
"jspmNodeConversion": false,
70+
"format": "cjs",
71+
"map": {
72+
"./browser.js": {
73+
"node": "./node.js"
74+
},
75+
"fs": "@node/fs",
76+
"net": "@node/net",
77+
"tty": "@node/tty",
78+
"util": "@node/util"
79+
}
80+
},
7081
"npm:fbjs@0.6.1": {
7182
"dependencies": {}
7283
},
@@ -75,6 +86,10 @@
7586
"test.js"
7687
]
7788
},
89+
"npm:ms@0.7.1": {
90+
"jspmNodeConversion": false,
91+
"format": "cjs"
92+
},
7893
"npm:react@0.14.7": {
7994
"dependencies": {
8095
"fbjs": "^0.6.1"
@@ -99,13 +114,12 @@
99114
}
100115
}
101116
},
102-
"npm:typescript@1.8.7": {
117+
"npm:typescript@1.8.10": {
103118
"browser": {},
104119
"map": {
105120
"buffer": "@empty",
106121
"child_process": "@empty",
107122
"fs": "@empty",
108-
"os": "@empty",
109123
"path": "@empty",
110124
"process": "@empty",
111125
"readline": "@empty"

src/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ import * as ReactDOM from 'react-dom';
1818
// components imports
1919
import {Main} from './components/main';
2020

21-
// todo: refactor name to appComponent
22-
export var appComponent: any = ReactDOM.render(<Main welcomeMessage="Welcome to React"/>, appContainer);
21+
const message = 'React / TypeScript / JSPM - Starter-Kit';
22+
export var appComponent: any = ReactDOM.render(<Main welcomeMessage={message} />, appContainer);

typings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"globalDependencies": {
3-
"react": "registry:dt/react#0.14.0+20160621225615",
3+
"react": "registry:dt/react#0.14.0+20160630100702",
44
"react-dom": "registry:dt/react-dom#0.14.0+20160412154040"
55
}
66
}

0 commit comments

Comments
 (0)