Skip to content

Instantly share code, notes, and snippets.

@KyleAMathews
Created November 13, 2014 07:26
Show Gist options
  • Save KyleAMathews/e9e636125a71266d3aeb to your computer and use it in GitHub Desktop.
Save KyleAMathews/e9e636125a71266d3aeb to your computer and use it in GitHub Desktop.
Atlassian's route table
ROUTES = Routes({
location: "history"
}, Route({
handler: Application
}, Route({
name: "not-found",
path: prefixedPath("/404"),
handler: NotFound
}), Route({
name: "home",
path: prefixedPath("/"),
handler: HomeIndex
}), Route({
name: "articles",
path: prefixedPath("/articles"),
handler: NewsSection
}, Route({
name: "articles-index",
path: prefixedPath("/articles"),
handler: NewsIndex
}), Route({
name: "article-detail",
path: prefixedPath("/articles/:name"),
handler: NewsDetail
})), Route({
name: "search",
path: prefixedPath("/search"),
handler: SearchIndex
}), Route({
name: "tutorials",
path: prefixedPath("/tutorials"),
handler: TutorialSection
}, Route({
name: "tutorial-index",
path: prefixedPath("/tutorials"),
handler: TutorialIndex
}), Route({
name: "tutorial",
path: prefixedPath("/tutorials/:name"),
handler: TutorialDetail,
preserveScrollPosition: !0
}, Route({
name: "tutorial-section",
path: prefixedPath("/tutorials/:name/:section"),
preserveScrollPosition: !0,
handler: TutorialDetail
}))), Route({
name: "glossary",
path: prefixedPath("/glossary"),
handler: ReferenceIndex
}, Route({
name: "commands",
path: prefixedPath("/glossary"),
handler: ReferenceCommandIndex,
preserveScrollPosition: !0
}, Route({
name: "command-detail",
path: prefixedPath("/glossary/commands/git-:command"),
preserveScrollPosition: !0,
handler: ReferenceCommandIndex
})), Route({
name: "terminology",
path: prefixedPath("/glossary/terminology"),
handler: ReferenceGlossaryIndex,
preserveScrollPosition: !0
}, Route({
name: "terminology-detail",
path: prefixedPath("/glossary/terminology/:item"),
preserveScrollPosition: !0,
handler: ReferenceGlossaryIndex
})))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment