commit bcf5e41f7cfcd29de2475d72af69214a8d3dcf6f Author: Kar Date: Mon Sep 5 20:39:19 2022 +0530 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b42c0e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules +.DS_Store +dist +dist-ssr +*.local +debug.log +.idea \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3d734b2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +MUKTI +license Mukti/Moksh - 'the liberation' is a basic realization that the result of distribution or giving away does not always come short, specially when things are non physical. MUKTI is not a license but a step towards a license free civilization. +Human race is better with 'some sense' rather a bunch of license. [have some sense, not licenses.] + +till all the licenses are deprecated and decentralize [ specially for software, hardware, education, experience,even the network protocol (internet) ], lets use freedom centric and/or having "take if it helps you, just don't sue us - kind of mentality" licenses like GPL, MIT, BSD ... + +this will not be registered / certified / legalise in any manner, as it's not about enforcement - it is about freedom to share. + +example of 'some sense': + verbose incremental documentation with versioning, attaching contributor information. + try to make some OFFERING to the contributor or the contributing organization with or without a subscription / support. + maximize the use of freedom centric tools[hardware, software, os ...] enen if it costs and costs more, try not to be the product. + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab2ea2d --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ + +### Getting Started + + +```sh +npm i +npm run dev +npm run build +npm run serve +``` diff --git a/auto-imports.d.ts b/auto-imports.d.ts new file mode 100644 index 0000000..33e95b5 --- /dev/null +++ b/auto-imports.d.ts @@ -0,0 +1,60 @@ +// Generated by 'unplugin-auto-import' +export {} +declare global { + const EffectScope: typeof import('vue')['EffectScope'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const defineLoader: typeof import('vue-router/auto')['defineLoader'] + const definePage: typeof import('vue-router/auto')['definePage'] + const effectScope: typeof import('vue')['effectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useHead: typeof import('@vueuse/head')['useHead'] + const useRoute: typeof import('vue-router/auto')['useRoute'] + const useRouter: typeof import('vue-router/auto')['useRouter'] + const useSlots: typeof import('vue')['useSlots'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] +} diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 0000000..9740b42 --- /dev/null +++ b/components.d.ts @@ -0,0 +1,14 @@ +// generated by unplugin-vue-components +// We suggest you to commit this file into source control +// Read more: https://github.com/vuejs/core/pull/3399 +import '@vue/runtime-core' + +export {} + +declare module '@vue/runtime-core' { + export interface GlobalComponents { + ButtonRepo: typeof import('./src/components/ButtonRepo.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..67278ea --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + Vite, Vue3, Tailwind CSS + + + + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..6b00f9c --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "vite-vue3-tailwind-starter", + "version": "0.0.0", + "scripts": { + "dev": "vite --host", + "build": "vue-tsc --noEmit && vite build", + "serve": "vite preview" + }, + "dependencies": { + "@vueuse/head": "^0.7.9", + "vue": "^3.2.38", + "vue-router": "^4.1.5" + }, + "devDependencies": { + "@headlessui/vue": "^1.6.7", + "@heroicons/vue": "^2.0.10", + "@tailwindcss/aspect-ratio": "^0.4.2", + "@tailwindcss/forms": "^0.5.3", + "@tailwindcss/line-clamp": "^0.4.2", + "@tailwindcss/typography": "^0.5.7", + "@vitejs/plugin-vue": "^3.1.0", + "@vue/tsconfig": "^0.1.3", + "autoprefixer": "^10.4.8", + "prettier-plugin-tailwindcss": "^0.1.13", + "tailwindcss": "^3.1.8", + "typescript": "^4.8.2", + "unplugin-auto-import": "^0.11.2", + "unplugin-vue-components": "^0.22.4", + "unplugin-vue-router": "^0.2.1", + "vite": "^3.1.0", + "vue-tsc": "^0.40.7" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/public/DWD-Logo-01.png b/public/DWD-Logo-01.png new file mode 100644 index 0000000..1af6ab0 Binary files /dev/null and b/public/DWD-Logo-01.png differ diff --git a/public/DWD-Logo-02.png b/public/DWD-Logo-02.png new file mode 100644 index 0000000..6d33096 Binary files /dev/null and b/public/DWD-Logo-02.png differ diff --git a/public/DWD-Logo.svg b/public/DWD-Logo.svg new file mode 100644 index 0000000..af4a74a --- /dev/null +++ b/public/DWD-Logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/DWD-Logo_round-01.png b/public/DWD-Logo_round-01.png new file mode 100644 index 0000000..2cd514a Binary files /dev/null and b/public/DWD-Logo_round-01.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e1ae57b Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/font/Inter-italic.var.woff2 b/public/font/Inter-italic.var.woff2 new file mode 100644 index 0000000..b826d5a Binary files /dev/null and b/public/font/Inter-italic.var.woff2 differ diff --git a/public/font/Inter-roman.var.woff2 b/public/font/Inter-roman.var.woff2 new file mode 100644 index 0000000..6a256a0 Binary files /dev/null and b/public/font/Inter-roman.var.woff2 differ diff --git a/public/font/inter.css b/public/font/inter.css new file mode 100644 index 0000000..c6487f0 --- /dev/null +++ b/public/font/inter.css @@ -0,0 +1,16 @@ +@font-face { + font-family: 'Inter var'; + font-weight: 100 900; + font-display: swap; + font-style: normal; + font-named-instance: 'Regular'; + src: url('Inter-roman.var.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter var'; + font-weight: 100 900; + font-display: swap; + font-style: italic; + font-named-instance: 'Italic'; + src: url('Inter-italic.var.woff2') format('woff2'); +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..14267e9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..a1f62ac --- /dev/null +++ b/src/App.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/ButtonRepo.vue b/src/components/ButtonRepo.vue new file mode 100644 index 0000000..98f189a --- /dev/null +++ b/src/components/ButtonRepo.vue @@ -0,0 +1,10 @@ + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..b3eef47 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,16 @@ +import { createApp } from 'vue' +import './tailwind.css' +import App from './App.vue' +import { createRouter, createWebHistory } from 'vue-router/auto' +import { createHead } from '@vueuse/head' + +const app = createApp(App) +const head = createHead() + +const router = createRouter({ + history: createWebHistory(), +}) + +app.use(router) +app.use(head) +app.mount(document.body) diff --git a/src/pages/[...404].vue b/src/pages/[...404].vue new file mode 100644 index 0000000..03cbd18 --- /dev/null +++ b/src/pages/[...404].vue @@ -0,0 +1,13 @@ + + + diff --git a/src/pages/about.vue b/src/pages/about.vue new file mode 100644 index 0000000..2cac142 --- /dev/null +++ b/src/pages/about.vue @@ -0,0 +1,39 @@ + +{ + "meta": { + "title": "About" + } +} + + + + + diff --git a/src/pages/index.vue b/src/pages/index.vue new file mode 100644 index 0000000..b88843e --- /dev/null +++ b/src/pages/index.vue @@ -0,0 +1,39 @@ + +{ + "meta": { + "title": "Home" + } +} + + + + + diff --git a/src/tailwind.css b/src/tailwind.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/src/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..323c78a --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1,7 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..d545702 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,19 @@ +const defaultTheme = require('tailwindcss/defaultTheme') + +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./index.html', './src/**/*.{vue,js,ts}'], + theme: { + extend: { + fontFamily: { + sans: ['"Inter var"', ...defaultTheme.fontFamily.sans], + }, + }, + }, + plugins: [ + require('@tailwindcss/forms'), + require('@tailwindcss/typography'), + require('@tailwindcss/line-clamp'), + require('@tailwindcss/aspect-ratio'), + ], +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9b1e028 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "allowJs": true + }, + "exclude": ["node_modules", "dist"], + "include": [ + "typed-router.d.ts", + "components.d.ts", + "auto-imports.d.ts", + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.vue" + ], + "extends": "@vue/tsconfig/tsconfig.json" +} diff --git a/typed-router.d.ts b/typed-router.d.ts new file mode 100644 index 0000000..1f52f0d --- /dev/null +++ b/typed-router.d.ts @@ -0,0 +1,125 @@ +// 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. + +/// + +import type { + // type safe route locations + RouteLocationTypedList, + RouteLocationResolvedTypedList, + RouteLocationNormalizedTypedList, + RouteLocationNormalizedLoadedTypedList, + + // helper types + // route definitions + RouteRecordInfo, + ParamValue, + ParamValueOneOrMore, + ParamValueZeroOrMore, + ParamValueZeroOrOne, + + // vue-router extensions + _RouterTyped, + RouterLinkTyped, + NavigationGuard, + UseLinkFnTyped, + + // data fetching + _DataLoader, + _DefineLoaderOptions, +} from 'unplugin-vue-router' + +declare module 'vue-router/auto/routes' { + export interface RouteNamedMap { + '/': RouteRecordInfo<'/', '/', Record, Record>, + '/[...404]': RouteRecordInfo<'/[...404]', '/:404(.*)', { 404: ParamValue }, { 404: ParamValue }>, + '/about': RouteRecordInfo<'/about', '/about', Record, Record>, + } +} + +declare module 'vue-router/auto' { + import type { RouteNamedMap } from 'vue-router/auto/routes' + + export type RouterTyped = _RouterTyped + + /** + * Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationNormalized = RouteLocationNormalizedTypedList[Name] + + /** + * Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationNormalizedLoaded = RouteLocationNormalizedLoadedTypedList[Name] + + /** + * Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationResolved = RouteLocationResolvedTypedList[Name] + + /** + * Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocation = RouteLocationTypedList[Name] + + /** + * Generate a type safe params for a route location. Requires the name of the route to be passed as a generic. + */ + export type RouteParams = RouteNamedMap[Name]['params'] + /** + * Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic. + */ + export type RouteParamsRaw = RouteNamedMap[Name]['paramsRaw'] + + export function useRouter(): RouterTyped + export function useRoute(name?: Name): RouteLocationNormalizedLoadedTypedList[Name] + + export const useLink: UseLinkFnTyped + + export function onBeforeRouteLeave(guard: NavigationGuard): void + export function onBeforeRouteUpdate(guard: NavigationGuard): void + + // Experimental Data Fetching + + export function defineLoader< + P extends Promise, + Name extends keyof RouteNamedMap = keyof RouteNamedMap, + isLazy extends boolean = false, + >( + name: Name, + loader: (route: RouteLocationNormalizedLoaded) => P, + options?: _DefineLoaderOptions, + ): _DataLoader, isLazy> + export function defineLoader< + P extends Promise, + isLazy extends boolean = false, + >( + loader: (route: RouteLocationNormalizedLoaded) => P, + options?: _DefineLoaderOptions, + ): _DataLoader, isLazy> + + export { + _definePage as definePage, + _HasDataLoaderMeta as HasDataLoaderMeta, + _setupDataFetchingGuard as setupDataFetchingGuard, + _stopDataFetchingScope as stopDataFetchingScope, + } from 'unplugin-vue-router/runtime' +} + +declare module 'vue-router' { + import type { RouteNamedMap } from 'vue-router/auto/routes' + + export interface TypesConfig { + beforeRouteUpdate: NavigationGuard + beforeRouteLeave: NavigationGuard + + $route: RouteLocationNormalizedLoadedTypedList[keyof RouteNamedMap] + $router: _RouterTyped + + RouterLink: RouterLinkTyped + } +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..db9d690 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import AutoImport from 'unplugin-auto-import/vite' +import VueRouter from 'unplugin-vue-router/vite' +import { VueRouterAutoImports } from 'unplugin-vue-router' +import Components from 'unplugin-vue-components/vite' +import { HeadlessUiResolver } from 'unplugin-vue-components/resolvers' + +export default defineConfig({ + plugins: [ + VueRouter({}), + vue(), + Components({ resolvers: [HeadlessUiResolver()] }), + AutoImport({ + imports: ['vue', '@vueuse/head', VueRouterAutoImports], + }), + ], + server: { + open: true, + }, +})