This repository has been archived by the owner on Aug 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cadecairos/make-it-work
Make it work!
- Loading branch information
Showing
35 changed files
with
1,017 additions
and
11,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
# Webmaker-Firehose | ||
|
||
Webmaker Firehose is a simple app server and React app that displays the latest | ||
makes created on Webmaker.org, and enables them to be featured on Webmaker.org by | ||
admins. | ||
|
||
## Setup | ||
|
||
Clone this repo, then run `npm install` to get everything set up. | ||
Required for local dev: | ||
|
||
* [MakeAPI server](https://github.com/mozilla/makeapi) | ||
* [Webmaker login](https://github.com/mozilla/login.webmaker.org) - for login, ensure your account has admin privileges. | ||
* [Webmaker.org server](https://github.com/mozilla/webmaker.org) - for viewing the gallery | ||
* [Make Valet](https://github.com/mozilla/make-valet) - for proxying make url requests | ||
* To create/edit makes, you'll want a webmaker app like [Thimble](https://github.com/mozilla/thimble.webmaker.org) | ||
or [Popcorn](https://github.com/mozilla/popcorn.webmaker.org) | ||
|
||
Clone this repo, then run `npm install` to get dependencies set up. | ||
|
||
run `cp server/config/defaults.env .env` to create an environment file. Change any | ||
values you need to. The default settings should work out of the box with other webmaker apps. | ||
|
||
To perform a build for the current implementation, run `gulp`. | ||
|
||
To test the current implementation, run `node server` and | ||
point your browser at [http://localhost:5001](http://localhost:5001) | ||
|
||
### Development with live reloading | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
var FirehoseDispatcher = require("../dispatcher/FirehoseDispatcher"); | ||
var FirehoseConstants = require("./FirehoseConstants"); | ||
var EventEmitter = require("events").EventEmitter; | ||
|
||
var FirehoseActions = Object.assign({}, EventEmitter.prototype, { | ||
toggleFeature: function() { | ||
FirehoseDispatcher.dispatch({ | ||
actionType: FirehoseConstants.TOGGLE_FEATURE | ||
}); | ||
}, | ||
trash: function() { | ||
FirehoseDispatcher.dispatch({ | ||
actionType: FirehoseConstants.TRASH | ||
}); | ||
}, | ||
navigate: function(delta) { | ||
FirehoseDispatcher.dispatch({ | ||
actionType: FirehoseConstants.NAVIGATE, | ||
delta: delta | ||
}); | ||
}, | ||
addListener: function(actionType, callback) { | ||
this.on(actionType, callback); | ||
}, | ||
deleteListener: function(actionType, callback) { | ||
this.removeListener(actionType, callback); | ||
}, | ||
emitEvent: function(actionType, data) { | ||
this.emit(actionType, data); | ||
} | ||
}); | ||
|
||
FirehoseDispatcher.register(function(payload) { | ||
switch(payload.actionType) { | ||
case FirehoseConstants.TOGGLE_FEATURE: | ||
FirehoseActions.emitEvent(FirehoseConstants.TOGGLE_FEATURE); | ||
break; | ||
|
||
case FirehoseConstants.TRASH: | ||
FirehoseActions.emitEvent(FirehoseConstants.TRASH); | ||
break; | ||
|
||
case FirehoseConstants.NAVIGATE: | ||
FirehoseActions.emitEvent(FirehoseConstants.NAVIGATE, payload.delta); | ||
break; | ||
default: | ||
// no op | ||
} | ||
}) | ||
|
||
module.exports = FirehoseActions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var FirehoseConstants = { | ||
"TOGGLE_FEATURE": "TOGGLE_FEATURE", | ||
"TRASH": "TRASH", | ||
"NAVIGATE": "NAVIGATE" | ||
}; | ||
|
||
module.exports = FirehoseConstants; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.