Giter Club home page Giter Club logo

page-fu's Introduction

page-fu

Your source of bananas for all-things routing with 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 or browserify 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.

page-fu's People

Contributors

amireh avatar

Watchers

 avatar  avatar  avatar

page-fu's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.