Permalink
Browse files

Combine latest files and add dist

  • Loading branch information...
1 parent 7efa51e commit 62d4caf650c1a6cc7709bfad824e27f13913a3e0 @wdavew wdavew committed Nov 30, 2016
Showing with 26 additions and 34 deletions.
  1. +3 −0 .babelrc
  2. +2 −1 .gitignore
  3. +0 −24 npm-debug.log
  4. +2 −2 package.json
  5. +0 −1 src/Timeline.js
  6. +12 −0 src/index.js
  7. +7 −6 src/reactiveComponent.js
View
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015", "react"]
+}
View
@@ -1 +1,2 @@
-node_modules/
+node_modules/
+dist/
View
@@ -1,24 +0,0 @@
-0 info it worked if it ends with ok
-1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
-2 info using npm@3.10.9
-3 info using node@v6.9.1
-4 verbose stack Error: missing script: start
-4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:151:19)
-4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:61:5
-4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5
-4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45)
-4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3)
-4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
-4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:243:12
-4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
-4 verbose stack at tryToString (fs.js:455:3)
-4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)
-5 verbose cwd /Users/jaspinall/Desktop/soop
-6 error Darwin 16.1.0
-7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
-8 error node v6.9.1
-9 error npm v3.10.9
-10 error missing script: start
-11 error If you need help, you may report this error at:
-11 error <https://github.com/npm/npm/issues>
-12 verbose exit [ 1, true ]
View
@@ -1,10 +1,10 @@
{
"name": "soop",
- "version": "1.0.0",
+ "version": "0.0.1",
"description": "Stream based state management for React built on RxJs",
"main": "index.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "build": "babel src --out-dir dist"
},
"repository": {
"type": "git",
View
@@ -2,7 +2,6 @@ import React, { Component } from 'react';
import Rx from 'rxjs/Rx';
import Slider from './Slider';
import TimelineUnit from './TimelineUnit';
-require("../styles/timeline-style.css")
const styles = {
position: 'fixed',
View
@@ -0,0 +1,12 @@
+import upstream from './upstream.js';
+import StreamProvider from './StreamProvider.js';
+import reactiveComponent from './reactiveComponent.js';
+import Timeline from './Timeline.js';
+
+
+module.exports = {
+ upstream: upstream,
+ StreamProvider: StreamProvider,
+ reactiveComponent: reactiveComponent,
+ Timeline: Timeline,
+}
@@ -13,12 +13,11 @@ const mapStreamsToProps = (filteredStreams, streamNames) => {
// exports function to create new components that builds upon the native React component class
export default function (componentDefinition, ...streams) {
- return class extends Component {
- // do we need this?
- state = { childProps: {} }
- static contextTypes = { upstream: React.PropTypes.object.isRequired }
-
- //
+ class ReactiveComponent extends Component {
+ constructor() {
+ super()
+ this.state = { childProps: {} }
+ }
componentDidMount() {
// make dispatch and upstream accessible to all components
this.dispatch = this.context.upstream.dispatch.bind(this.context.upstream);
@@ -42,4 +41,6 @@ export default function (componentDefinition, ...streams) {
null);
}
}
+ ReactiveComponent.contextTypes = { upstream: React.PropTypes.object.isRequired }
+ return ReactiveComponent;
}

0 comments on commit 62d4caf

Please sign in to comment.