Skip to content

Commit

Permalink
Merge pull request #9 from KevinAst/next3
Browse files Browse the repository at this point in the history
publish: v2.3.0 Simplified Mainline
  • Loading branch information
KevinAst authored Aug 24, 2019
2 parents 32e496b + d7efcbc commit 2afec08
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 49 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ frequent, so **eatery-nod-w** provides the spinning wheel!
- [Deployment]
- [NPM Scripts]
- [Revision History]
- [v2.2.0] - _**Better Async Initialization** (July 25, 2019)_
- [v2.1.0] - _**Responsive Design** (June 07, 2019)_
- [v2.0.0] - _**React Hooks** (May 10, 2019)_
- [v1.0.0] - _**Initial Release** (May 05, 2019)_


## Eatery Pool
Expand Down Expand Up @@ -248,8 +244,11 @@ because the modules _(or features)_ are smaller and more focused.
When features are **plug-and-play**, the application is in essence
broken up into several mini-apps _(so to speak)_.
Here is a complete list of [**eatery-nod-w**
features](src/features/README.md).
Here is a complete list of the **eatery-nod-w**
[**features**](src/features/README.md) that make up the application, and
the [**plugin aspects**](src/aspects/README.md) that auto-configure
the frameworks in it's run-time stack.
You can find more information about **[feature-u]** here:
Expand Down Expand Up @@ -408,12 +407,34 @@ eject ..... eject the Create React App project tooling
Release | What | *When*
---------|-------------------------------------------------|------------------
[v2.3.0] | Simplified Mainline | *August 24, 2019*
[v2.2.0] | Better Async Initialization | *July 25, 2019*
[v2.1.0] | Responsive Design | *June 07, 2019*
[v2.0.0] | React Hooks | *May 10, 2019*
[v1.0.0] | Initial Release | *May 05, 2019*
<!-- *** RELEASE *************************************************************** -->
### v2.3.0 - Simplified Mainline *(August 24, 2019)*
<ul><ul> <!--- indentation hack --->
[GitHub Content](https://github.com/KevinAst/eatery-nod-w/tree/v2.3.0)
&bull;
[GitHub Release](https://github.com/KevinAst/eatery-nod-w/releases/tag/v2.3.0)
&bull;
[Diff](https://github.com/KevinAst/eatery-nod-w/compare/v2.2.0...v2.3.0)
**Technical:**
- Simplify mainline (`app.js`) by extracting Aspect Plugin
accumulation/configuration in a new `aspects/` directory
_(consistent with how features are accumulated)_.
</ul></ul>
<!-- *** RELEASE *************************************************************** -->
### v2.2.0 - Better Async Initialization *(July 25, 2019)*
Expand Down Expand Up @@ -593,6 +614,7 @@ Release | What | *When*
[NPM Scripts]: #npm-scripts
[Revision History]: #revision-history
[v2.3.0]: #v230---simplified-mainline-august-24-2019
[v2.2.0]: #v220---better-async-initialization-july-25-2019
[v2.1.0]: #v210---responsive-design-june-07-2019
[v2.0.0]: #v200---react-hooks-may-10-2019
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eatery-nod-w",
"version": "2.2.0",
"version": "2.3.0",
"description": "A Date Night Restaurant Selector",
"author": "Kevin J. Bridges <[email protected]> (https://wiiBridges.com/)",
"about": {
Expand Down
44 changes: 7 additions & 37 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import 'util/ErrorExtensionPolyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import {launchApp} from 'feature-u';
import features from 'features';
import {createReducerAspect} from 'feature-redux';
import {createLogicAspect} from 'feature-redux-logic';
import {createRouteAspect} from 'feature-router';
import SplashScreen, {splash} from 'util/SplashScreen';
import configureEateryNodDiagnostics from 'util/configureEateryNodDiagnostics';
import ReactDOM from 'react-dom';
import {launchApp} from 'feature-u';
import features from 'features';
import aspects from 'aspects';
import {splash} from 'util/SplashScreen';

// launch our application, exposing the feature-u Fassets object (facilitating cross-feature-communication)!
// launch our app, exposing the Fassets object (facilitating cross-feature-communication)
export default launchApp({

features,
aspects: appAspects(),
aspects,

registerRootAppElm(rootAppElm) {
ReactDOM.render(rootAppElm,
Expand All @@ -24,28 +19,3 @@ export default launchApp({
splash(msg, err);
},
});


// accumulate/configure the Aspect plugins matching our app's run-time stack
function appAspects() {

// define our framework run-time stack
const reducerAspect = createReducerAspect();
const logicAspect = createLogicAspect();
const routeAspect = createRouteAspect();
const aspects = [
reducerAspect, // redux ... extending: Feature.reducer
logicAspect, // redux-logic ... extending: Feature.logic
routeAspect, // Feature Routes ... extending: Feature.route
];

// configure Aspects (as needed)
// ... StateRouter fallback screen (when no routes are in effect)
routeAspect.config.fallbackElm$ = <SplashScreen msg="I'm trying to think but it hurts!"/>;

// configure our app's overall diagnostics (non-production code)
configureEateryNodDiagnostics(reducerAspect, logicAspect, routeAspect);

// beam me up Scotty :-)
return aspects;
}
18 changes: 18 additions & 0 deletions src/aspects/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# eatery-nod-w aspects

The **eatery-nod-w** application uses the following plugin
**Aspects**, _auto-configuring the frameworks in it's run-time
stack_:

- [**feature-redux**]: for [redux] _(state management)_
- [**feature-redux-logic**]: for [redux-logic] _(managing business logic and async processes)_
- [**feature-router**]: for StateRouter _(feature-based navigation using redux state)_


[**feature-redux**]: https://github.com/KevinAst/feature-redux
[redux]: https://redux.js.org/

[**feature-redux-logic**]: https://github.com/KevinAst/feature-redux-logic
[redux-logic]: https://github.com/jeffbski/redux-logic

[**feature-router**]: https://github.com/KevinAst/feature-router
40 changes: 40 additions & 0 deletions src/aspects/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import {createReducerAspect} from 'feature-redux';
import {createLogicAspect} from 'feature-redux-logic';
import {createRouteAspect} from 'feature-router';
import SplashScreen from 'util/SplashScreen';
import configureEateryNodDiagnostics from 'util/configureEateryNodDiagnostics';


//***
//*** define/configure the aspects representing our app's run-time stack
//***

// redux - extending: Feature.reducer
const reducerAspect = createReducerAspect();

// redux-logic - extending: Feature.logic
const logicAspect = createLogicAspect();

// Feature Routes - extending: Feature.route
const routeAspect = createRouteAspect();
// ... define fallback screen (used when no routes are in effect)
routeAspect.config.fallbackElm$ = <SplashScreen msg="I'm trying to think but it hurts!"/>;


//***
//*** configure our app's overall diagnostics (non-production code)
//***

configureEateryNodDiagnostics(reducerAspect, logicAspect, routeAspect);


//***
//*** promote the aspects representing our app's run-time stack
//***

export default [
reducerAspect,
logicAspect,
routeAspect,
];
2 changes: 1 addition & 1 deletion src/features/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eatery-nod-w app
# eatery-nod-w features

The **eatery-nod-w** application is composed of the following **features**:

Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import 'util/ErrorExtensionPolyfill';
export {default} from 'app'; // redirect to app.js
8 changes: 4 additions & 4 deletions src/util/ErrorExtensionPolyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if (!Error.prototype.defineUserMsg) { // key off of one of several extension poi
/**
* Return an indicator as to whether this error was
* expected (say user input error),
* or not (say a catestrophic error).
* or not (say a catastrophic error).
*
* @return {boolean} error expected (true) or not (false).
*/
Expand All @@ -134,7 +134,7 @@ if (!Error.prototype.defineUserMsg) { // key off of one of several extension poi

/**
* Return an indicator as to whether this error was
* unexpected (say a catestrophic error),
* unexpected (say a catastrophic error),
* or not (say user input error).
*
* @return {boolean} error unexpected (true) or not (false).
Expand All @@ -149,7 +149,7 @@ if (!Error.prototype.defineUserMsg) { // key off of one of several extension poi
* additional details of what was being attempted.
*
* Errors with this context are prefixed with ' ... attempting to: ',
* so word your phrasing appropriatly.
* so word your phrasing appropriately.
*
* Multiple attempting-to phrases can be used, which will be
* combined with the ', -and- ' phrase.
Expand Down Expand Up @@ -180,7 +180,7 @@ if (!Error.prototype.defineUserMsg) { // key off of one of several extension poi


/**
* Extend the Error toString() to prefix user-specfic context.
* Extend the Error toString() to prefix user-specific context.
*/
const prior_toString = Error.prototype.toString; // monkey patch
Error.prototype.toString = function() {
Expand Down

0 comments on commit 2afec08

Please sign in to comment.