- Notifications
You must be signed in to change notification settings - Fork0
JavaScript Routes
arpitpractice/crossroads.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
This library requiresJS-Signals to work.
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
dev -> development files|- lib -> 3rd-party libraries|- src -> source files|- tests -> unit testsdist -> distribution files
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
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.
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.
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).
About
JavaScript Routes
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- JavaScript96.0%
- CSS2.8%
- HTML1.2%