Riothing.
Simple to use Library for riot isomorphic or client only app creation process.
Riothing client
https://cdn.rawgit.com/noneedsystem/riothing/v0.2.4/riothing.js
Riothing server
npm install -S riothing
<!--default folder structure-->
/public
/store
/app
/action
/data
root.html
How it works?
Client side only
- include client script & store functions to root.html
- initiate it by including
new Riothing({ stores: ['storeRoutes'] });
- Enjoy
Isomorphic approach
- include only client script to root.html
- install
riothing
throughnpm
- require riothing
const riothing = require('./riothing');
- use it as routing function
riothing.route(req, res)
- Enjoy
Usage
init: this.mixin('riothing')
methods: ['act', 'track', 'store']
variables: ['models', 'stores']
Works best with Fucss client
https://github.com/noneedsystem/fucss
https://cdn.rawgit.com/noneedsystem/fucss/0.6.9a/fucss.min.js
And lets not forget icons
https://cdn.rawgit.com/noneedsystem/fuico/0.0.8/style.css
https://github.com/noneedsystem/fuico
storeRiot example
{ return name: 'routes' state: initState actions: models: Route Meta model: RoutesState ; { return { let routes = this; let route = routes; ifroutelength !== 1 route = route; let routeName = routelength !== 1 ? routes0name : route0name; let state = this; //console.log(state); //set client title if!thisSERVER parent; console; this; return state; } } { thisroutes = dataroutes && dataroutes || prevroutes || name: 'main' main: true name: 'todo' name: 'test' ; thismetas = datametas || prevmetas || main: todo: title: 'todo poinout title' ; thisready = dataready || prevready || false; thispage = datapage || prevpage || 'main'; thissplash = datasplash; //generated values thisroute = thisroutes; thismeta = thismetasthispage || thismetas'main'; thissubroute = thissplash && thisroutes; return this; } { thisname = dataname || 'none'; thismain = datamain || false; thislink = datalink || thismain && '/' || '/' + thisname; thisview = dataview || 'page-' + thisname; return this; } { thistitle = datatitle || 'Poinout app'; thisdesc = datadesc || 'Simple app description'; thisauthor = dataauthor || 'egis'; thisimage = dataimage || ''; thisurl = dataurl || ''; thisfavicon = datafavicon || 'favicon.ico'; return this; }}