Skip to content

Commit

Permalink
chore(all): prepare release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Sep 4, 2015
1 parent f49bf0d commit a99abaa
Show file tree
Hide file tree
Showing 14 changed files with 766 additions and 1,370 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-route-recognizer",
"version": "0.6.2",
"version": "0.7.0",
"description": "A lightweight JavaScript library that matches paths against registered routes. It includes support for dynamic and star segments and nested handlers.",
"keywords": [
"aurelia",
Expand All @@ -16,6 +16,7 @@
"url": "http://github.com/aurelia/route-recognizer"
},
"dependencies": {
"aurelia-path": "^0.9.0",
"core-js": "zloirock/core-js"
}
}
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ System.config({
},

map: {
"aurelia-path": "github:aurelia/path@0.8.1",
"aurelia-path": "github:aurelia/path@0.9.0",
"babel": "npm:[email protected]",
"babel-runtime": "npm:[email protected]",
"core-js": "npm:[email protected]",
Expand Down
98 changes: 38 additions & 60 deletions dist/amd/aurelia-route-recognizer.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare module 'aurelia-route-recognizer' {
import * as core from 'core-js';
import 'core-js';
import { buildQueryString, parseQueryString } from 'aurelia-path';
export interface RouteHandler {
name: string;
}
Expand Down Expand Up @@ -67,7 +68,7 @@ declare module 'aurelia-route-recognizer' {
constructor(string: string);
eachChar(callback: ((spec: CharSpec) => void)): void;
regex(): string;
generate(params: Object, consumed: Object): string;
generate(): string;
}
export class DynamicSegment {
constructor(name: string);
Expand All @@ -82,84 +83,61 @@ declare module 'aurelia-route-recognizer' {
generate(params: Object, consumed: Object): string;
}
export class EpsilonSegment {
eachChar(callback: ((spec: CharSpec) => void)): void;
eachChar(): void;
regex(): string;
generate(params: Object, consumed: Object): string;
generate(): string;
}

/**
* Class that parses route patterns and matches path strings.
*
* @class RouteRecognizer
* @constructor
*/
* Class that parses route patterns and matches path strings.
*
* @class RouteRecognizer
* @constructor
*/
export class RouteRecognizer {
constructor();

/**
* Parse a route pattern and add it to the collection of recognized routes.
*
* @method add
* @param {Object} route The route to add.
*/
* Parse a route pattern and add it to the collection of recognized routes.
*
* @param route The route to add.
*/
add(route: ConfigurableRoute | ConfigurableRoute[]): State;

/**
* Retrieve the handlers registered for the named route.
*
* @method handlersFor
* @param {String} name The name of the route.
* @return {Array} The handlers.
*/
* Retrieve the handlers registered for the named route.
*
* @param name The name of the route.
* @returns The handlers.
*/
handlersFor(name: string): HandlerEntry[];

/**
* Check if this RouteRecognizer recognizes a named route.
*
* @method hasRoute
* @param {String} name The name of the route.
* @return {Boolean} True if the named route is recognized.
*/
* Check if this RouteRecognizer recognizes a named route.
*
* @param name The name of the route.
* @returns True if the named route is recognized.
*/
hasRoute(name: string): boolean;

/**
* Generate a path and query string from a route name and params object.
*
* @method generate
* @param {String} name The name of the route.
* @param {Object} params The route params to use when populating the pattern.
* Properties not required by the pattern will be appended to the query string.
* @return {String} The generated absolute path and query string.
*/
* Generate a path and query string from a route name and params object.
*
* @param name The name of the route.
* @param params The route params to use when populating the pattern.
* Properties not required by the pattern will be appended to the query string.
* @returns The generated absolute path and query string.
*/
generate(name: string, params: Object): string;

/**
* Generate a query string from an object.
*
* @method generateQueryString
* @param {Object} params Object containing the keys and values to be used.
* @return {String} The generated query string, including leading '?'.
*/
generateQueryString(params: Object): string;

/**
* Parse a query string.
*
* @method parseQueryString
* @param {String} The query string to parse.
* @return {Object} Object with keys and values mapped from the query string.
*/
parseQueryString(queryString: string): Object;

/**
* Match a path string against registered route patterns.
*
* @method recognize
* @param {String} path The path to attempt to match.
* @return {Array} Array of objects containing `handler`, `params`, and
* `isDynanic` values for the matched route(s), or undefined if no match
* was found.
*/
* Match a path string against registered route patterns.
*
* @param path The path to attempt to match.
* @returns Array of objects containing `handler`, `params`, and
* `isDynanic` values for the matched route(s), or undefined if no match
* was found.
*/
recognize(path: string): RecognizedRoute[];
}
class RecognizeResults {
Expand Down
Loading

0 comments on commit a99abaa

Please sign in to comment.