├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── package.json ├── public ├── config.js ├── index.html └── js │ ├── app.jsx │ └── test.jsx └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Commenting this out is preferred by some people, see 24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 25 | node_modules 26 | 27 | # Users Environment Variables 28 | .lock-wscript 29 | 30 | public/jspm_packages 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dockerfile/nodejs 2 | 3 | ENV PORT 80 4 | 5 | ADD ./ /sample 6 | WORKDIR /sample 7 | 8 | EXPOSE 80 9 | 10 | RUN npm install --unsafe-perm 11 | CMD npm start 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Lalit Kapoor 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | systemjs-es6-react-boilerplate 2 | ========= 3 | A boilerplate app in es6 making use of systemjs, react, jspm. 4 | 5 | To run: 6 | 7 | ```bash 8 | npm install 9 | npm start 10 | ``` 11 | 12 | To run with docker: 13 | 14 | ```bash 15 | docker build -t systemjs-es6-react-boilerplate . 16 | docker run -d -p 80:80 --name test systemjs-es6-react-boilerplate 17 | open http://$(boot2docker ip) #OSX 18 | # open http://127.0.0.1 #Linux 19 | ``` 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemjs-es6-react-boilerplate", 3 | "version": "0.1.1", 4 | "description": "a sample app in es6 making use of systemjs, react, jspm", 5 | "main": "server.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git@github.com:lalitkapoor/react-systemjs-es6-boilerplate.git" 9 | }, 10 | "dependencies": { 11 | "express": "4.12.4", 12 | "finalhandler": "0.3.3", 13 | "serve-static": "1.8.1" 14 | }, 15 | "devDependencies": { 16 | "jspm": "0.10.6" 17 | }, 18 | "scripts": { 19 | "test": "echo \"Error: no test specified\" && exit 1", 20 | "start": "node server.js", 21 | "postinstall": "./node_modules/.bin/jspm install" 22 | }, 23 | "author": "Lalit Kapoor ", 24 | "license": "MIT", 25 | "jspm": { 26 | "directories": { 27 | "baseURL": "public" 28 | }, 29 | "dependencies": { 30 | "jsx": "1.1.0", 31 | "react": "0.13.3" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | "paths": { 3 | "*": "*.js", 4 | "systemjs-es6-react-boilerplate/*": "lib/*.js", 5 | "github:*": "jspm_packages/github/*.js", 6 | "npm:*": "jspm_packages/npm/*.js" 7 | } 8 | }); 9 | 10 | System.config({ 11 | "map": { 12 | "jsx": "github:floatdrop/plugin-jsx@1.1.0", 13 | "react": "npm:react@0.13.3", 14 | "github:floatdrop/plugin-jsx@1.1.0": { 15 | "react-tools": "npm:react-tools@0.13.3" 16 | }, 17 | "github:jspm/nodelibs-assert@0.1.0": { 18 | "assert": "npm:assert@1.3.0" 19 | }, 20 | "github:jspm/nodelibs-buffer@0.1.0": { 21 | "buffer": "npm:buffer@3.2.2" 22 | }, 23 | "github:jspm/nodelibs-constants@0.1.0": { 24 | "constants-browserify": "npm:constants-browserify@0.0.1" 25 | }, 26 | "github:jspm/nodelibs-crypto@0.1.0": { 27 | "crypto-browserify": "npm:crypto-browserify@3.9.14" 28 | }, 29 | "github:jspm/nodelibs-events@0.1.1": { 30 | "events": "npm:events@1.0.2" 31 | }, 32 | "github:jspm/nodelibs-http@1.7.1": { 33 | "Base64": "npm:Base64@0.2.1", 34 | "events": "github:jspm/nodelibs-events@0.1.1", 35 | "inherits": "npm:inherits@2.0.1", 36 | "stream": "github:jspm/nodelibs-stream@0.1.0", 37 | "url": "github:jspm/nodelibs-url@0.1.0", 38 | "util": "github:jspm/nodelibs-util@0.1.0" 39 | }, 40 | "github:jspm/nodelibs-path@0.1.0": { 41 | "path-browserify": "npm:path-browserify@0.0.0" 42 | }, 43 | "github:jspm/nodelibs-process@0.1.1": { 44 | "process": "npm:process@0.10.1" 45 | }, 46 | "github:jspm/nodelibs-stream@0.1.0": { 47 | "stream-browserify": "npm:stream-browserify@1.0.0" 48 | }, 49 | "github:jspm/nodelibs-string_decoder@0.1.0": { 50 | "string_decoder": "npm:string_decoder@0.10.31" 51 | }, 52 | "github:jspm/nodelibs-url@0.1.0": { 53 | "url": "npm:url@0.10.3" 54 | }, 55 | "github:jspm/nodelibs-util@0.1.0": { 56 | "util": "npm:util@0.10.3" 57 | }, 58 | "github:jspm/nodelibs-vm@0.1.0": { 59 | "vm-browserify": "npm:vm-browserify@0.0.4" 60 | }, 61 | "npm:amdefine@0.1.1": { 62 | "fs": "github:jspm/nodelibs-fs@0.1.2", 63 | "path": "github:jspm/nodelibs-path@0.1.0", 64 | "process": "github:jspm/nodelibs-process@0.1.1" 65 | }, 66 | "npm:asn1.js@2.0.4": { 67 | "assert": "github:jspm/nodelibs-assert@0.1.0", 68 | "bn.js": "npm:bn.js@2.0.5", 69 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 70 | "inherits": "npm:inherits@2.0.1", 71 | "minimalistic-assert": "npm:minimalistic-assert@1.0.0", 72 | "vm": "github:jspm/nodelibs-vm@0.1.0" 73 | }, 74 | "npm:assert@1.3.0": { 75 | "util": "npm:util@0.10.3" 76 | }, 77 | "npm:ast-types@0.6.16": { 78 | "assert": "github:jspm/nodelibs-assert@0.1.0", 79 | "util": "github:jspm/nodelibs-util@0.1.0" 80 | }, 81 | "npm:browserify-aes@1.0.1": { 82 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 83 | "create-hash": "npm:create-hash@1.1.1", 84 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 85 | "fs": "github:jspm/nodelibs-fs@0.1.2", 86 | "inherits": "npm:inherits@2.0.1", 87 | "stream": "github:jspm/nodelibs-stream@0.1.0", 88 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 89 | }, 90 | "npm:browserify-rsa@2.0.1": { 91 | "bn.js": "npm:bn.js@2.0.5", 92 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 93 | "constants": "github:jspm/nodelibs-constants@0.1.0", 94 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 95 | "randombytes": "npm:randombytes@2.0.1" 96 | }, 97 | "npm:browserify-sign@3.0.2": { 98 | "bn.js": "npm:bn.js@2.0.5", 99 | "browserify-rsa": "npm:browserify-rsa@2.0.1", 100 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 101 | "create-hash": "npm:create-hash@1.1.1", 102 | "create-hmac": "npm:create-hmac@1.1.3", 103 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 104 | "elliptic": "npm:elliptic@3.1.0", 105 | "inherits": "npm:inherits@2.0.1", 106 | "parse-asn1": "npm:parse-asn1@3.0.1", 107 | "stream": "github:jspm/nodelibs-stream@0.1.0" 108 | }, 109 | "npm:buffer@3.2.2": { 110 | "base64-js": "npm:base64-js@0.0.8", 111 | "ieee754": "npm:ieee754@1.1.6", 112 | "is-array": "npm:is-array@1.0.1" 113 | }, 114 | "npm:commander@2.5.1": { 115 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 116 | "events": "github:jspm/nodelibs-events@0.1.1", 117 | "path": "github:jspm/nodelibs-path@0.1.0", 118 | "process": "github:jspm/nodelibs-process@0.1.1" 119 | }, 120 | "npm:commoner@0.10.1": { 121 | "assert": "github:jspm/nodelibs-assert@0.1.0", 122 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 123 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 124 | "commander": "npm:commander@2.5.1", 125 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 126 | "events": "github:jspm/nodelibs-events@0.1.1", 127 | "fs": "github:jspm/nodelibs-fs@0.1.2", 128 | "glob": "npm:glob@4.2.2", 129 | "graceful-fs": "npm:graceful-fs@3.0.8", 130 | "iconv-lite": "npm:iconv-lite@0.4.10", 131 | "install": "npm:install@0.1.8", 132 | "mkdirp": "npm:mkdirp@0.5.1", 133 | "path": "github:jspm/nodelibs-path@0.1.0", 134 | "private": "npm:private@0.1.6", 135 | "process": "github:jspm/nodelibs-process@0.1.1", 136 | "q": "npm:q@1.1.2", 137 | "recast": "npm:recast@0.9.18", 138 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 139 | }, 140 | "npm:constants-browserify@0.0.1": { 141 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 142 | }, 143 | "npm:core-util-is@1.0.1": { 144 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 145 | }, 146 | "npm:create-ecdh@2.0.1": { 147 | "bn.js": "npm:bn.js@2.0.5", 148 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 149 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 150 | "elliptic": "npm:elliptic@3.1.0" 151 | }, 152 | "npm:create-hash@1.1.1": { 153 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 154 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 155 | "fs": "github:jspm/nodelibs-fs@0.1.2", 156 | "inherits": "npm:inherits@2.0.1", 157 | "ripemd160": "npm:ripemd160@1.0.1", 158 | "sha.js": "npm:sha.js@2.4.2", 159 | "stream": "github:jspm/nodelibs-stream@0.1.0" 160 | }, 161 | "npm:create-hmac@1.1.3": { 162 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 163 | "create-hash": "npm:create-hash@1.1.1", 164 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 165 | "inherits": "npm:inherits@2.0.1", 166 | "stream": "github:jspm/nodelibs-stream@0.1.0" 167 | }, 168 | "npm:crypto-browserify@3.9.14": { 169 | "browserify-aes": "npm:browserify-aes@1.0.1", 170 | "browserify-sign": "npm:browserify-sign@3.0.2", 171 | "create-ecdh": "npm:create-ecdh@2.0.1", 172 | "create-hash": "npm:create-hash@1.1.1", 173 | "create-hmac": "npm:create-hmac@1.1.3", 174 | "diffie-hellman": "npm:diffie-hellman@3.0.2", 175 | "inherits": "npm:inherits@2.0.1", 176 | "pbkdf2": "npm:pbkdf2@3.0.4", 177 | "public-encrypt": "npm:public-encrypt@2.0.1", 178 | "randombytes": "npm:randombytes@2.0.1" 179 | }, 180 | "npm:diffie-hellman@3.0.2": { 181 | "bn.js": "npm:bn.js@2.0.5", 182 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 183 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 184 | "miller-rabin": "npm:miller-rabin@2.0.1", 185 | "randombytes": "npm:randombytes@2.0.1" 186 | }, 187 | "npm:elliptic@3.1.0": { 188 | "bn.js": "npm:bn.js@2.0.5", 189 | "brorand": "npm:brorand@1.0.5", 190 | "hash.js": "npm:hash.js@1.0.3", 191 | "inherits": "npm:inherits@2.0.1", 192 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 193 | }, 194 | "npm:envify@3.4.0": { 195 | "jstransform": "npm:jstransform@10.1.0", 196 | "process": "github:jspm/nodelibs-process@0.1.1", 197 | "through": "npm:through@2.3.7" 198 | }, 199 | "npm:esprima-fb@10001.1.0-dev-harmony-fb": { 200 | "fs": "github:jspm/nodelibs-fs@0.1.2", 201 | "process": "github:jspm/nodelibs-process@0.1.1" 202 | }, 203 | "npm:esprima-fb@13001.1001.0-dev-harmony-fb": { 204 | "fs": "github:jspm/nodelibs-fs@0.1.2", 205 | "process": "github:jspm/nodelibs-process@0.1.1" 206 | }, 207 | "npm:glob@4.2.2": { 208 | "assert": "github:jspm/nodelibs-assert@0.1.0", 209 | "events": "github:jspm/nodelibs-events@0.1.1", 210 | "fs": "github:jspm/nodelibs-fs@0.1.2", 211 | "inflight": "npm:inflight@1.0.4", 212 | "inherits": "npm:inherits@2.0.1", 213 | "minimatch": "npm:minimatch@1.0.0", 214 | "once": "npm:once@1.3.2", 215 | "path": "github:jspm/nodelibs-path@0.1.0", 216 | "process": "github:jspm/nodelibs-process@0.1.1", 217 | "util": "github:jspm/nodelibs-util@0.1.0" 218 | }, 219 | "npm:graceful-fs@3.0.8": { 220 | "assert": "github:jspm/nodelibs-assert@0.1.0", 221 | "constants": "github:jspm/nodelibs-constants@0.1.0", 222 | "process": "github:jspm/nodelibs-process@0.1.1", 223 | "util": "github:jspm/nodelibs-util@0.1.0", 224 | "vm": "github:jspm/nodelibs-vm@0.1.0" 225 | }, 226 | "npm:hash.js@1.0.3": { 227 | "inherits": "npm:inherits@2.0.1" 228 | }, 229 | "npm:iconv-lite@0.4.10": { 230 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 231 | "process": "github:jspm/nodelibs-process@0.1.1", 232 | "stream": "github:jspm/nodelibs-stream@0.1.0", 233 | "string_decoder": "github:jspm/nodelibs-string_decoder@0.1.0", 234 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 235 | }, 236 | "npm:inflight@1.0.4": { 237 | "once": "npm:once@1.3.2", 238 | "process": "github:jspm/nodelibs-process@0.1.1", 239 | "wrappy": "npm:wrappy@1.0.1" 240 | }, 241 | "npm:inherits@2.0.1": { 242 | "util": "github:jspm/nodelibs-util@0.1.0" 243 | }, 244 | "npm:install@0.1.8": { 245 | "assert": "github:jspm/nodelibs-assert@0.1.0", 246 | "fs": "github:jspm/nodelibs-fs@0.1.2", 247 | "path": "github:jspm/nodelibs-path@0.1.0", 248 | "process": "github:jspm/nodelibs-process@0.1.1" 249 | }, 250 | "npm:jstransform@10.1.0": { 251 | "base62": "npm:base62@0.1.1", 252 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 253 | "esprima-fb": "npm:esprima-fb@13001.1001.0-dev-harmony-fb", 254 | "fs": "github:jspm/nodelibs-fs@0.1.2", 255 | "process": "github:jspm/nodelibs-process@0.1.1", 256 | "source-map": "npm:source-map@0.1.31" 257 | }, 258 | "npm:miller-rabin@2.0.1": { 259 | "bn.js": "npm:bn.js@2.0.5", 260 | "brorand": "npm:brorand@1.0.5" 261 | }, 262 | "npm:minimatch@1.0.0": { 263 | "lru-cache": "npm:lru-cache@2.6.4", 264 | "path": "github:jspm/nodelibs-path@0.1.0", 265 | "process": "github:jspm/nodelibs-process@0.1.1", 266 | "sigmund": "npm:sigmund@1.0.1" 267 | }, 268 | "npm:mkdirp@0.5.1": { 269 | "fs": "github:jspm/nodelibs-fs@0.1.2", 270 | "minimist": "npm:minimist@0.0.8", 271 | "path": "github:jspm/nodelibs-path@0.1.0", 272 | "process": "github:jspm/nodelibs-process@0.1.1" 273 | }, 274 | "npm:once@1.3.2": { 275 | "wrappy": "npm:wrappy@1.0.1" 276 | }, 277 | "npm:parse-asn1@3.0.1": { 278 | "asn1.js": "npm:asn1.js@2.0.4", 279 | "browserify-aes": "npm:browserify-aes@1.0.1", 280 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 281 | "create-hash": "npm:create-hash@1.1.1", 282 | "pbkdf2": "npm:pbkdf2@3.0.4", 283 | "systemjs-json": "github:systemjs/plugin-json@0.1.0" 284 | }, 285 | "npm:path-browserify@0.0.0": { 286 | "process": "github:jspm/nodelibs-process@0.1.1" 287 | }, 288 | "npm:pbkdf2@3.0.4": { 289 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 290 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 291 | "create-hmac": "npm:create-hmac@1.1.3", 292 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 293 | "path": "github:jspm/nodelibs-path@0.1.0", 294 | "process": "github:jspm/nodelibs-process@0.1.1" 295 | }, 296 | "npm:public-encrypt@2.0.1": { 297 | "bn.js": "npm:bn.js@2.0.5", 298 | "browserify-rsa": "npm:browserify-rsa@2.0.1", 299 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 300 | "create-hash": "npm:create-hash@1.1.1", 301 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 302 | "parse-asn1": "npm:parse-asn1@3.0.1", 303 | "randombytes": "npm:randombytes@2.0.1" 304 | }, 305 | "npm:punycode@1.3.2": { 306 | "process": "github:jspm/nodelibs-process@0.1.1" 307 | }, 308 | "npm:q@1.1.2": { 309 | "process": "github:jspm/nodelibs-process@0.1.1" 310 | }, 311 | "npm:randombytes@2.0.1": { 312 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 313 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 314 | "process": "github:jspm/nodelibs-process@0.1.1" 315 | }, 316 | "npm:react-tools@0.13.3": { 317 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 318 | "commoner": "npm:commoner@0.10.1", 319 | "jstransform": "npm:jstransform@10.1.0", 320 | "process": "github:jspm/nodelibs-process@0.1.1" 321 | }, 322 | "npm:react@0.13.3": { 323 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 324 | "envify": "npm:envify@3.4.0", 325 | "process": "github:jspm/nodelibs-process@0.1.1" 326 | }, 327 | "npm:readable-stream@1.1.13": { 328 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 329 | "core-util-is": "npm:core-util-is@1.0.1", 330 | "events": "github:jspm/nodelibs-events@0.1.1", 331 | "inherits": "npm:inherits@2.0.1", 332 | "isarray": "npm:isarray@0.0.1", 333 | "process": "github:jspm/nodelibs-process@0.1.1", 334 | "stream": "github:jspm/nodelibs-stream@0.1.0", 335 | "stream-browserify": "npm:stream-browserify@1.0.0", 336 | "string_decoder": "npm:string_decoder@0.10.31", 337 | "util": "github:jspm/nodelibs-util@0.1.0" 338 | }, 339 | "npm:recast@0.9.18": { 340 | "assert": "github:jspm/nodelibs-assert@0.1.0", 341 | "ast-types": "npm:ast-types@0.6.16", 342 | "esprima-fb": "npm:esprima-fb@10001.1.0-dev-harmony-fb", 343 | "fs": "github:jspm/nodelibs-fs@0.1.2", 344 | "private": "npm:private@0.1.6", 345 | "process": "github:jspm/nodelibs-process@0.1.1", 346 | "source-map": "npm:source-map@0.1.43" 347 | }, 348 | "npm:ripemd160@1.0.1": { 349 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 350 | "process": "github:jspm/nodelibs-process@0.1.1" 351 | }, 352 | "npm:sha.js@2.4.2": { 353 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 354 | "fs": "github:jspm/nodelibs-fs@0.1.2", 355 | "inherits": "npm:inherits@2.0.1", 356 | "process": "github:jspm/nodelibs-process@0.1.1" 357 | }, 358 | "npm:sigmund@1.0.1": { 359 | "http": "github:jspm/nodelibs-http@1.7.1", 360 | "util": "github:jspm/nodelibs-util@0.1.0" 361 | }, 362 | "npm:source-map@0.1.31": { 363 | "amdefine": "npm:amdefine@0.1.1", 364 | "fs": "github:jspm/nodelibs-fs@0.1.2", 365 | "path": "github:jspm/nodelibs-path@0.1.0", 366 | "process": "github:jspm/nodelibs-process@0.1.1" 367 | }, 368 | "npm:source-map@0.1.43": { 369 | "amdefine": "npm:amdefine@0.1.1", 370 | "fs": "github:jspm/nodelibs-fs@0.1.2", 371 | "path": "github:jspm/nodelibs-path@0.1.0", 372 | "process": "github:jspm/nodelibs-process@0.1.1" 373 | }, 374 | "npm:stream-browserify@1.0.0": { 375 | "events": "github:jspm/nodelibs-events@0.1.1", 376 | "inherits": "npm:inherits@2.0.1", 377 | "readable-stream": "npm:readable-stream@1.1.13" 378 | }, 379 | "npm:string_decoder@0.10.31": { 380 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 381 | }, 382 | "npm:through@2.3.7": { 383 | "process": "github:jspm/nodelibs-process@0.1.1", 384 | "stream": "github:jspm/nodelibs-stream@0.1.0" 385 | }, 386 | "npm:url@0.10.3": { 387 | "assert": "github:jspm/nodelibs-assert@0.1.0", 388 | "punycode": "npm:punycode@1.3.2", 389 | "querystring": "npm:querystring@0.2.0", 390 | "util": "github:jspm/nodelibs-util@0.1.0" 391 | }, 392 | "npm:util@0.10.3": { 393 | "inherits": "npm:inherits@2.0.1", 394 | "process": "github:jspm/nodelibs-process@0.1.1" 395 | }, 396 | "npm:vm-browserify@0.0.4": { 397 | "indexof": "npm:indexof@0.0.1" 398 | } 399 | } 400 | }); 401 | 402 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /public/js/app.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Test from './test.jsx!' 3 | 4 | React.render( 5 | 6 | , document.getElementById('main') 7 | ) 8 | -------------------------------------------------------------------------------- /public/js/test.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default React.createClass({ 4 | displayName: 'Test' 5 | , render: function () { 6 | return ( 7 |
Awesome Test!
8 | ) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var http = require('http') 2 | var express = require('express') 3 | var serveStatic = require('serve-static') 4 | var finalhandler = require('finalhandler') 5 | 6 | var port = process.env.PORT || 3000 7 | 8 | var static = serveStatic('public', {'index': ['index.html']}) 9 | 10 | var app = express() 11 | app.use(static) 12 | 13 | var server = http.createServer(app) 14 | 15 | server.listen(port, function(error) { 16 | if (error) return console.error(error) 17 | console.log('Listening at localhost:'+port); 18 | }) 19 | --------------------------------------------------------------------------------