Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JavaScript Routes

NotificationsYou must be signed in to change notification settings

arpitpractice/crossroads.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status


Crossroads - JavaScript Routes

Introduction

Crossroads.js is a routing library inspired by URL Route/Dispatch utilities present on frameworks like Rails, Pyramid, Django, CakePHP, CodeIgniter, etc...It parses a string input and decides which action should be executed by matching the string against multiple patterns.

If used properly it can reduce code complexity by decoupling objects and also by abstracting navigation paths.

Seeproject page for documentation and more details.

Links

Dependencies

This library requiresJS-Signals to work.

License

MIT License

Distribution Files

Files insidedist folder.

  • crossroads.js : Uncompressed source code with comments.
  • crossroads.min.js : Compressed code.

You can install Crossroads on Node.js usingNPM

npm install crossroads

Repository Structure

Folder Structure

dev       ->  development files|- lib          ->  3rd-party libraries|- src          ->  source files|- tests        ->  unit testsdist      ->  distribution files

Branches

master      ->  always contain code from the latest stable versionrelease-**  ->  code canditate for the next stable version (alpha/beta)dev         ->  main development branch (nightly)gh-pages    ->  project page**other**   ->  features/hotfixes/experimental, probably non-stable code

Building your own

This project usesNode.js for the build process. If for some reason you need to build a custom version install Node.js and run:

node build

This will delete all JS files inside thedist folder, merge/update/compress source files and copy the output to thedist folder.

IMPORTANT:dist folder always contain the latest version, regular users shouldnot need to run build task.

Running unit tests

On the browser

Opendev/tests/spec_runner-dist.html on your browser.

spec_runner-dist testsdist/crossroads.js andspec_runner-dev tests files insidedev/src - they all run the same specs.

On Node.js

Installnpm and run:

npm install --devnpm test

Each time you runnpm test the files inside thedist folder will be updated(it executesnode build as apretest script).

Packages

No packages published

Languages

  • JavaScript96.0%
  • CSS2.8%
  • HTML1.2%

[8]ページ先頭

©2009-2025 Movatter.jp