GitXplorerGitXplorer
c

ember-router-mapper

public
8 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
6aa357e652f1efc79444ea3d89e9b6a5541b71d4

add routes prefix

cchadhietala committed 10 years ago
Unverified
a8b5dfa3a56e5197a2169e20fa2375d91fda2b57

Add routes prefix

cchadhietala committed 10 years ago
Unverified
68d7748625921c19b86e9d3e78db60ff94c7d546

Remove un-needed deps

cchadhietala committed 10 years ago
Unverified
b8546a8721216881f2d2d7aa47868eb41efcf58f

Update readme

cchadhietala committed 10 years ago
Unverified
59c536db11d33775469725d6676bc6f5828301dd

Initial commit

cchadhietala committed 10 years ago

README

The README file for this repository.

Ember Router Mapper

Does statical analysis on the Ember Router to pull out top level and nested routes/resource names that can be mapped back on to the file system.

This will possibly be used in generating bundles of files based on routes.

Given a router that looks like this

import Ember from "ember";
var Router = Ember.Router.extend({
    location: FooENV.locationType
});
Router.map(function () {
    this.resource("index");
    this.route("post");
    this.resource("book", {
        path: "/foo"
    });
    this.resource("car", function () {
        this.route("new");
        this.resource("baz", function () {
            this.route("boo");
            this.resource("fizz", function () {
                this.route("dog")
            })
        });
    });
    this.resource("cat", function () {
        this.route("lion")
    })
});
export default Router;

It will produce this.

{
  "index": "app/routes/index",
  "post": "app/routes/post",
  "book": "app/routes/book",
  "car": "app/routes/car",
  "car/new": "app/routes/car/new",
  "car/baz": "app/routes/car/baz",
  "car/baz/boo": "app/routes/car/baz/boo",
  "car/baz/fizz": "app/routes/car/baz/fizz",
  "car/baz/fizz/dog": "app/routes/car/baz/fizz/dog",
  "cat": "app/routes/cat",
  "cat/lion": "app/routes/cat/lion"
}

Install

npm install

Testing

npm test