Skip to content

Commit c87212b

Browse files
committed
bundle
1 parent bb53eb8 commit c87212b

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
jspm_packages
2+
*.map
3+
bundle/*.js

README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,14 @@ jspm install
1313
## Run
1414

1515
```
16-
npm run
16+
npm start
1717
```
18+
19+
## Bundle
20+
21+
```
22+
npm run bundle
23+
```
24+
25+
This creates main.js in the bundle dir, which you can then ship off to a server.
26+

bundle/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Hello React!</title>
5+
</head>
6+
7+
<body>
8+
<div id="main"></div>
9+
10+
<script src="main.js"></script>
11+
</body>
12+
</html>

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"start": "browser-sync start --server --files **/*",
8+
"bundle": "jspm bundle-sfx main bundle/main.js",
89
"test": "echo \"Error: no test specified\" && exit 1"
910
},
1011
"author": "",

0 commit comments

Comments
 (0)