Nepotistic Pontifex Maximus


    0.14.38-patch.0 • Public • Published


    This README outlines the details of collaborating on this Ember addon.


    • git clone <repository-url> this repository
    • cd @cardstack/routing
    • npm install
    • bower install


    Running Tests

    • npm test (Runs ember try:each to test your addon against multiple Ember versions)
    • ember test
    • ember test --server


    • ember build

    Design notes

    Boundaries of the routing module:

    • provides a router map function that has routes for all your content
    • relies on store.{findRecord,query,createRecord}
      • you can duck-type the store if you don't want ember-data directly
    • expects you to have models
      • named one-to-one with the logical routing names for your default branch
      • named with a branch prefix for non-default branches ("draft--articles" vs "articles")
      • with an optional static property "routingField" that causes URLs to be structured around something other than id
    • exposes helpers for
      • modelName -> { logicalName, branch }
      • { logicalName, branch } -> modelName
    • provides a placeholder model that can be rendered for 404 conditions, while maintaining enough state to shift branches
    • provides a transitionTo(logicalName, id, branch) function
    • provides a cardstack-href helper that maps { logicalType, id, branch } -> url. With a shorthand for also doing { model } -> url.
    • provides a cardstack-new-href helper that maps { logicalType, branch } -> url
    • has configurable defaultBranch and defaultContentType, but we can hard code those for the present


    npm i @cardstack/routing

    DownloadsWeekly Downloads






    Unpacked Size

    34.9 kB

    Total Files


    Last publish


    • pcjun97
    • jurgen
    • burcunoyan
    • ef4
    • alexspeller
    • habdelra
    • lukemelia
    • aierie