Common react
components, redux
, react-router
, redux-router
, redux-saga
boilerplate and helper codebase
Make sure you are using at least npm@3
and node@4
.
npm install --save-dev re-app
Creating project from scratch with re-app-builder
Make sure you are using at least npm@3
and node@4
.
cd
into empty project directory and run these commands
npm init # initialize your project as npm package
npm i --save-dev re-app-builder # install re-app-builder
npm i --save-dev re-app # install re-app
Create public/index.html
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="root"></div>
<script src="/index.js"></script>
</body>
</html>
Create src/index.js
, for example:
/* eslint-disable */
import React from 'react';
import ReactDOM from 'react-dom';
function *generator() { // generator functions supported
}
class App extends React.Component {
render() {
return (
<strong>cool</strong> // jsx supported
);
}
}
ReactDOM.render(<App/>, document.getElementById('root'));
Merge following into your package.json
(add re-app-builder
script)
{"scripts": {"ab": "node ./node_modules/re-app-builder"}}
Run
npm run ab dev
Look at http://127.0.0.1:8080
To develop re-app
and/or examples, clone this repository.
To build re-app one time, run
npm run build
To watch changes in sources and build on the fly run
npm run build:watch
Resulting CommonJS build files are located in lib
directory.
To develop examples, run both commands simultaneously
npm run build:watch # builds library and watches changes
npm run ab dev # builds examples
Website featuring re-app
examples will then be served on http://127.0.0.1:8080
Tests are stored in test
folder. Run them by executing npm run test
.
You can also run only subset of tests by running npm run test:file -- --grep "test description"
.
Here will be list of utility functions
Here will be list of pure components
Here will be list of container components (aka smart components)
Here will be list of decorators providing common functionality
Module is a bundle of related redux
actions, redux
reducer, redux-saga
s and selector functions.
A module can depend on selector functions and actions of another module.
Keeps api service
Keeps authentication context of application
Handles routing actions and state
Handles flash messages
Handles modal windows
Keeps entity schemas and normalizr schemas (here called "mappings" for separation)
Handles entity data
Handles lists of entities
Handles entity editors
Dependency root is a module with no dependencies. A module depends on every module on oriented paths leading to dependency roots. There should be no cycles. See the proposed tree here
This project is licensed under the terms of the MIT license. See LICENSE.md
.