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
|
package app
|
||||||
|
|
||||||
import (
|
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
|
package main
|
||||||
|
|
||||||
import "git.zervo.org/zervo/alpacca/app"
|
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
|
package alpacca
|
||||||
|
|
||||||
import "embed"
|
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>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<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>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
<v-main>
|
<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>
|
<template>
|
||||||
<v-container class="fill-height" max-width="900">
|
<v-container class="fill-height" max-width="900">
|
||||||
<div>
|
<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,9 +1,14 @@
|
||||||
/**
|
/*
|
||||||
* main.ts
|
Alpacca: The modern package repository hosting platform.
|
||||||
*
|
Copyright (C) 2025, Zervó Zadachin
|
||||||
* Bootstraps Vuetify and other plugins then mounts the App`
|
|
||||||
|
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
|
// Composables
|
||||||
import { createApp } from 'vue'
|
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,9 +1,14 @@
|
||||||
/**
|
/*
|
||||||
* plugins/index.ts
|
Alpacca: The modern package repository hosting platform.
|
||||||
*
|
Copyright (C) 2025, Zervó Zadachin
|
||||||
* Automatically included in `./src/main.ts`
|
|
||||||
|
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
|
// Types
|
||||||
import type { App } from 'vue'
|
import type { App } from 'vue'
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
/**
|
/*
|
||||||
* plugins/vuetify.ts
|
Alpacca: The modern package repository hosting platform.
|
||||||
*
|
Copyright (C) 2025, Zervó Zadachin
|
||||||
* Framework documentation: https://vuetifyjs.com`
|
|
||||||
|
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
|
// Composables
|
||||||
import { createVuetify } from 'vuetify'
|
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 { createRouter, createWebHistory } from 'vue-router'
|
||||||
import Index from '@/views/Index.vue'
|
import Index from '@/views/Index.vue'
|
||||||
|
import { withLayout } from './layoutWrapper'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', component: Index },
|
{ path: '/', component: withLayout(Index) },
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
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>
|
<template>
|
||||||
<HelloWorld />
|
<HelloWorld />
|
||||||
</template>
|
</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 */
|
/* eslint-disable perfectionist/sort-imports */
|
||||||
// Plugins
|
// Plugins
|
||||||
import Vue from '@vitejs/plugin-vue'
|
import Vue from '@vitejs/plugin-vue'
|
||||||
|
@ -41,9 +52,6 @@ export default defineConfig({
|
||||||
exclude: [
|
exclude: [
|
||||||
'vuetify',
|
'vuetify',
|
||||||
'vue-router',
|
'vue-router',
|
||||||
'unplugin-vue-router/runtime',
|
|
||||||
'unplugin-vue-router/data-loaders',
|
|
||||||
'unplugin-vue-router/data-loaders/basic',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
define: { 'process.env': {} },
|
define: { 'process.env': {} },
|
||||||
|
|
Loading…
Add table
Reference in a new issue