Co-authored-by: widlam <mikolaj.widla@gmail.com> Reviewed-on: #240 Reviewed-by: Adam Bem <bema@noreply.example.com> Co-authored-by: Mikolaj Widla <widlam@noreply.example.com> Co-committed-by: Mikolaj Widla <widlam@noreply.example.com>
		
			
				
	
	
		
			70 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { createRouter, createWebHistory } from 'vue-router'
 | |
| 
 | |
| const landingPage = import("@views/LandingView.vue")
 | |
| const restMock = import("@views/RestMockView.vue")
 | |
| 
 | |
| const jsonFormatter = import("@views/JsonFormatterView.vue")
 | |
| const xmlFormatter = import("@views/XmlFormatterView.vue")
 | |
| const HtmlFormatterView = import("@views/HtmlFormatterView.vue")
 | |
| 
 | |
| const xsltTool = import("@views/XSLTView.vue")
 | |
| const xsdTool = import("@views/XSDView.vue")
 | |
| const xpathTool = import("@views/XPathView.vue")
 | |
| const xqueryTool = import("@views/XQueryView.vue")
 | |
| 
 | |
| const routes = [
 | |
|   {
 | |
|     path: '/',
 | |
|     name: 'landing',
 | |
|     component: () => landingPage
 | |
|   },
 | |
|   {
 | |
|     path: '/format/xml',
 | |
|     name: 'xmlFormatter',
 | |
|     component: () => xmlFormatter
 | |
|   },
 | |
|   {
 | |
|     path: '/format/json',
 | |
|     name: 'jsonFormatter',
 | |
|     component: () => jsonFormatter
 | |
|   },
 | |
|   {
 | |
|     path: '/format/html',
 | |
|     name: 'htmlFormatter',
 | |
|     component: () => HtmlFormatterView
 | |
|   },
 | |
|   {
 | |
|     path: '/xml/xpath',
 | |
|     name: 'xpath',
 | |
|     component: () => xpathTool
 | |
|   },
 | |
|   {
 | |
|     path: '/xml/xquery',
 | |
|     name: 'xquery',
 | |
|     component: () => xqueryTool
 | |
|   },
 | |
|   {
 | |
|     path: '/xml/xsd',
 | |
|     name: 'xsd',
 | |
|     component: () => xsdTool
 | |
|   },
 | |
|   {
 | |
|     path: '/xml/xslt',
 | |
|     name: 'xslt',
 | |
|     component: () => xsltTool
 | |
|   },
 | |
|   {
 | |
|     path: '/rest/mock',
 | |
|     name: 'restmock',
 | |
|     component: () => restMock
 | |
|   }
 | |
| ]
 | |
| 
 | |
| 
 | |
| const router = createRouter({
 | |
|   history: createWebHistory(import.meta.env.BASE_URL),
 | |
|   routes: routes
 | |
| })
 | |
| 
 | |
| 
 | |
| export default router; |