reddit-mobile is a web server and build system for building polymorphic React applications in node. It is part of a larger series of plugins that, together, form frontend applications for reddit.
See the wiki for an in-depth explanation of how everything fits together.
- Install node.js v4.2 and npm 3.5
- Fork and clone this project.
- Run
npm installto install other dependencies. - Run
git submodule update --initto download this project's submodules. - Run
npm run buildto build the assets (npm run watchto set up a filesystem watcher.) - Register a new oauth application and
set up your environment variables. Redirect URI should be
http://localhost:4444/oauth2/token. - Run
npm startto start the web server. Optionally, create a startup script atstart.shthat sets environment variables and starts the server;start.shhas been added to the.gitignoreand will not get checked in. - If you need to work on dependencies (snoode, horse-react, etc):
- Delete the dependencies you installed from ./node_modules
- Fork and clone the dependencies somewhere
- Run
npm linkwithin the dependency that you cloned - Repeat recursively if you need to work on a dependency's dependency
- Re-run the build and restart your server (
npm run watchwill watch linked files)
- Commit hooks - symlink
hooksinto.git/hooks(ln -s -f ./hooks .git/hooks), which will run some safety checks before committing and pushing code.