├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── server.js ├── src ├── components │ └── App.react.js └── index.js └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | build 4 | 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | 15 | 16 | # Optional npm cache directory 17 | .npm 18 | 19 | # Optional REPL history 20 | .node_repl_history 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-rxjs-webpack-es6-barebones-starter 2 | Barebones starter kit for React and RxJS, using Webpack and ES6. 3 | 4 | # Instructions 5 | `npm run dev` to run webpack 6 | `npm run serve` to serve your app on port `9000` -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | React, RxJS, Webpack, es6 5 | 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-rxjs-webpack-es6-barebones-starter", 3 | "version": "0.0.3", 4 | "description": "Barebones starter kit for React and RxJS, using Webpack and ES6.", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "webpack -wdc --progress", 8 | "serve": "nodemon server.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/sdtsui/es6-react-rxjs-webpack-barebones-starter" 13 | }, 14 | "author": "Daniel Tsui", 15 | "devDependencies": { 16 | "babel-core": "^5.1.11", 17 | "babel-loader": "^5.0.0", 18 | "react": "^0.14.8", 19 | "rx": "^2.5.2", 20 | "webpack": "^1.8.9", 21 | "react-dom": "^0.14.8" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | express().use('/',express.static(__dirname)).listen(9000); 3 | console.log("Listening on 9000..."); -------------------------------------------------------------------------------- /src/components/App.react.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react'; 2 | 3 | class App extends Component { 4 | render() { 5 | return ( 6 | Hello World 7 | ); 8 | } 9 | } 10 | 11 | App.propTypes = {}; 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | let Rx = require('rx'); 2 | let React = require('react'); 3 | let ReactDOM = require('react-dom'); 4 | import App from './components/App.react.js'; 5 | 6 | ReactDOM.render( 7 | , 8 | document.getElementById('app') 9 | ); 10 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | 5 | entry: [ 6 | './src/index' 7 | ], 8 | 9 | output: { 10 | path: path.join(__dirname, 'build'), 11 | filename: 'index.js' 12 | }, 13 | 14 | module: { 15 | loaders: [{ 16 | test: function (filename) { 17 | if (filename.indexOf('node_modules') !== -1) { 18 | return false; 19 | } else { 20 | return /\.js$/.test(filename) !== -1; 21 | } 22 | }, 23 | loaders: ['babel-loader'] 24 | }] 25 | }, 26 | 27 | resolve: { 28 | modulesDirectories: [path.join(__dirname, 'src'), 'node_modules'] 29 | } 30 | 31 | }; 32 | --------------------------------------------------------------------------------