1.0.1 • Published 8 years ago
slush-revelry v1.0.1
slush-revelry
A generator for Revelry Node.js apps that use React, Redux, and more.
Install
npm install -g slush revelrylabs/slush-revelry
Generators
To create a new app:
slush revelry:new my-app-name
cd my-app-nameCreate a new feature module (from the project root directory):
slush revelry:module widgetsThe generated application
There are several READMEs in the generated app. Here's an overview of what you get out of the box:
- A full page universal-rendering Express app that uses React and Redux with zero setup.
- Preset
gulpandwebpackconfiguration for unified client and server builds. - Asset cache-busting.
- A live-reloading dev task.
- Auto-loaded per-feature views.
- Auto-loaded per-feature server routes.
- Auto-loaded per-feature state reducers.
- Routing presets to handle three cases:
- Routes like
/widgets/14render HTML. - Routes like
/jsonui/widgets/14render the corresponding vars as JSON. POST /__RENDER__: Send a JSON payload like{"name": "widgets/show", "data": {"widget": {"id": 14}}}to render HTML. (To use the server as a rendering service for another app.)
- Routes like
To run the server and watch for changes, use npm run dev.
Contributing to the generator
Make your edits to the code, and run npm test to create and start a generated test app on port 8000.
Read package.json and slushfile.js to see exactly what it does.
1.0.1
8 years ago