Compare commits
4 commits
9fc70cfe57
...
73c9315fbf
Author | SHA1 | Date | |
---|---|---|---|
73c9315fbf | |||
3469a9f946 | |||
0fe03fdd5b | |||
1b2f7a7941 |
17 changed files with 157 additions and 80 deletions
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
package app
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import "git.zervo.org/zervo/alpacca/app"
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
package alpacca
|
||||
|
||||
import "embed"
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!--
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!--
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<v-main>
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!--
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<v-container class="fill-height" max-width="900">
|
||||
<div>
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# Components
|
||||
|
||||
Vue template files in this folder are automatically imported.
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
Importing is handled by [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components). This plugin automatically imports `.vue` files created in the `src/components` directory, and registers them as global components. This means that you can use any component in your application without having to manually import it.
|
||||
|
||||
The following example assumes a component located at `src/components/MyComponent.vue`:
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<div>
|
||||
<MyComponent />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
//
|
||||
</script>
|
||||
```
|
||||
|
||||
When your template is rendered, the component's import will automatically be inlined, which renders to this:
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<div>
|
||||
<MyComponent />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import MyComponent from '@/components/MyComponent.vue'
|
||||
</script>
|
||||
```
|
16
src/web/src/layouts/DefaultLayout.vue
Normal file
16
src/web/src/layouts/DefaultLayout.vue
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!--
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<v-main>
|
||||
<slot />
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
|
@ -1,8 +1,13 @@
|
|||
/**
|
||||
* main.ts
|
||||
*
|
||||
* Bootstraps Vuetify and other plugins then mounts the App`
|
||||
*/
|
||||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* main.ts: Bootstraps Vuetify and other plugins then mounts the App */
|
||||
|
||||
// Composables
|
||||
import { createApp } from 'vue'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.
|
|
@ -1,8 +1,13 @@
|
|||
/**
|
||||
* plugins/index.ts
|
||||
*
|
||||
* Automatically included in `./src/main.ts`
|
||||
*/
|
||||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* plugins/index.ts: Registers Vue plugins */
|
||||
|
||||
// Types
|
||||
import type { App } from 'vue'
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
/**
|
||||
* plugins/vuetify.ts
|
||||
*
|
||||
* Framework documentation: https://vuetifyjs.com`
|
||||
*/
|
||||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* plugins/vuetify.ts: Plugin initializer for vuetify */
|
||||
|
||||
// Composables
|
||||
import { createVuetify } from 'vuetify'
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* router/index.ts: Registers the Vue router and routes */
|
||||
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Index from '@/views/Index.vue'
|
||||
import { withLayout } from './layoutWrapper'
|
||||
|
||||
const routes = [
|
||||
{ path: '/', component: Index },
|
||||
{ path: '/', component: withLayout(Index) },
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
|
24
src/web/src/router/layoutWrapper.ts
Normal file
24
src/web/src/router/layoutWrapper.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* router/layoutWrapper.ts: Simple layout implementation that wraps views in layouts */
|
||||
|
||||
import { defineComponent, h } from 'vue'
|
||||
import DefaultLayout from '@/layouts/DefaultLayout.vue'
|
||||
|
||||
export function withLayout (pageComponent: any, layoutComponent: any = DefaultLayout) {
|
||||
return defineComponent({
|
||||
name: 'WrappedWithLayout',
|
||||
render () {
|
||||
return h(layoutComponent, {}, {
|
||||
default: () => h(pageComponent),
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
23
src/web/src/typed-router.d.ts
vendored
23
src/web/src/typed-router.d.ts
vendored
|
@ -1,23 +0,0 @@
|
|||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
||||
// It's recommended to commit this file.
|
||||
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
||||
|
||||
declare module 'vue-router/auto-routes' {
|
||||
import type {
|
||||
RouteRecordInfo,
|
||||
ParamValue,
|
||||
ParamValueOneOrMore,
|
||||
ParamValueZeroOrMore,
|
||||
ParamValueZeroOrOne,
|
||||
} from 'vue-router'
|
||||
|
||||
/**
|
||||
* Route name map generated by unplugin-vue-router
|
||||
*/
|
||||
export interface RouteNamedMap {
|
||||
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
|
||||
}
|
||||
}
|
|
@ -1,3 +1,12 @@
|
|||
<!--
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<HelloWorld />
|
||||
</template>
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
/*
|
||||
Alpacca: The modern package repository hosting platform.
|
||||
Copyright (C) 2025, Zervó Zadachin
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
|
||||
*/
|
||||
|
||||
/* vite.config.ts: Vite configuration */
|
||||
|
||||
/* eslint-disable perfectionist/sort-imports */
|
||||
// Plugins
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
|
@ -41,9 +52,6 @@ export default defineConfig({
|
|||
exclude: [
|
||||
'vuetify',
|
||||
'vue-router',
|
||||
'unplugin-vue-router/runtime',
|
||||
'unplugin-vue-router/data-loaders',
|
||||
'unplugin-vue-router/data-loaders/basic',
|
||||
],
|
||||
},
|
||||
define: { 'process.env': {} },
|
||||
|
|
Loading…
Add table
Reference in a new issue