Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amireh/page-fu
page.js routing sugar
https://github.com/amireh/page-fu
javascript page-js routing
Last synced: about 18 hours ago
JSON representation
page.js routing sugar
- Host: GitHub
- URL: https://github.com/amireh/page-fu
- Owner: amireh
- Created: 2017-05-20T00:39:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T23:44:07.000Z (almost 7 years ago)
- Last Synced: 2024-12-15T04:47:38.712Z (14 days ago)
- Topics: javascript, page-js, routing
- Language: JavaScript
- Homepage: https://amireh.github.io/page-fu/
- Size: 761 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# page-fu
Your source of bananas for all-things routing with
[page.js](https://visionmedia.github.io/page.js/).______
.-"""".._'. _,##
_..__ |.-"""-.| | _,##'`-._
(_____)||_____|| |_,##'`-._,##'`
_| |.;-""-. | |#'`-._,##'`
_.;_ `--' `\ \ |.'`\._,##'`
/.-.\ `\ |.-";.`_, |##'`
|\__/ | _..;__ |'-' /
'.____.'_.-`)\--' /'-'`
//||\\(_.-'_,'-'`
(`-...-')_,##'`
jgs _,##`-..,-;##`
_,##'`-._,##'`
_,##'`-._,##'`
`-._,##'`The [[package | page-fu]] exposes a [[construct | Route]], a few [[helpers |
Router]], and a bunch of decorators to provide some structure around routing
with page.js.While page.js is elegant and powerful, building an application around it will
usually lead to the creation of some constructs and abstractions. page-fu is a
collection of such abstractions that will support your routing logic.## Installation
Install the package from NPM:
npm install --save page-fu
Please note that the sources are distributed in ES6 format and require a module
loader like [webpack](https://webpack.js.org/) or
[browserify](http://browserify.org/) to work. There are currently no plans to
distribute compiled versions.## What's inside
The gem of this package is the [[route handling construct | Route]]. It
decorates your existing route handlers (what you pass to [`page(String,
Function|Object)`](https://visionmedia.github.io/page.js /#pagepath-callback-
callback-)) with extra functionality in a way that is not obtrusive.Moreover, the package focuses on the testability of route handlers so you will
find that everything it provides is (somewhat) easily testable. Minimal voodoo
involved - promise!Get started by looking into the [[Route]] construct. You can also refer to the
the [[package | page-fu]] reference to see what symbols are exported for your
use and how to use them if you're unfamiliar with ES6 packages.## Testing
Refer to the [[testing guide | ./doc/testing.md]] to learn how to test every
inch of your route handlers.