summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore39
-rw-r--r--env.d.ts1
-rw-r--r--index.html13
-rw-r--r--package.json32
-rw-r--r--public/favicon.icobin0 -> 4286 bytes
-rw-r--r--src/App.vue5
-rw-r--r--src/assets/base.css86
-rw-r--r--src/assets/logo.svg1
-rw-r--r--src/assets/main.css35
-rw-r--r--src/main.ts12
-rw-r--r--src/router/index.ts15
-rw-r--r--src/stores/news.ts5
-rw-r--r--src/views/HomeView.vue7
-rw-r--r--tsconfig.app.json18
-rw-r--r--tsconfig.json11
-rw-r--r--tsconfig.node.json28
-rw-r--r--vite.config.ts23
17 files changed, 331 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cd68f14
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,39 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+coverage
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+*.tsbuildinfo
+
+.eslintcache
+
+# Cypress
+/cypress/videos/
+/cypress/screenshots/
+
+# Vitest
+__screenshots__/
+
+# Vite
+*.timestamp-*-*.mjs
diff --git a/env.d.ts b/env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/env.d.ts
@@ -0,0 +1 @@
+/// <reference types="vite/client" />
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..9e5fc8f
--- /dev/null
+++ b/index.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="">
+ <head>
+ <meta charset="UTF-8">
+ <link rel="icon" href="/favicon.ico">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Vite App</title>
+ </head>
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/src/main.ts"></script>
+ </body>
+</html>
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f914fa2
--- /dev/null
+++ b/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "news-app",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "run-p type-check \"build-only {@}\" --",
+ "preview": "vite preview",
+ "build-only": "vite build",
+ "type-check": "vue-tsc --build"
+ },
+ "dependencies": {
+ "pinia": "^3.0.4",
+ "vue": "^3.5.29",
+ "vue-router": "^5.0.3"
+ },
+ "devDependencies": {
+ "@tsconfig/node24": "^24.0.4",
+ "@types/node": "^24.11.0",
+ "@vitejs/plugin-vue": "^6.0.4",
+ "@vue/tsconfig": "^0.8.1",
+ "npm-run-all2": "^8.0.4",
+ "typescript": "~5.9.3",
+ "vite": "^7.3.1",
+ "vite-plugin-vue-devtools": "^8.0.6",
+ "vue-tsc": "^3.2.5"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+}
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..df36fcf
--- /dev/null
+++ b/public/favicon.ico
Binary files differ
diff --git a/src/App.vue b/src/App.vue
new file mode 100644
index 0000000..dd302d7
--- /dev/null
+++ b/src/App.vue
@@ -0,0 +1,5 @@
+<script setup lang="ts">
+</script>
+
+<template>
+</template>
diff --git a/src/assets/base.css b/src/assets/base.css
new file mode 100644
index 0000000..8816868
--- /dev/null
+++ b/src/assets/base.css
@@ -0,0 +1,86 @@
+/* color palette from <https://github.com/vuejs/theme> */
+:root {
+ --vt-c-white: #ffffff;
+ --vt-c-white-soft: #f8f8f8;
+ --vt-c-white-mute: #f2f2f2;
+
+ --vt-c-black: #181818;
+ --vt-c-black-soft: #222222;
+ --vt-c-black-mute: #282828;
+
+ --vt-c-indigo: #2c3e50;
+
+ --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
+ --vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
+ --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
+ --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
+
+ --vt-c-text-light-1: var(--vt-c-indigo);
+ --vt-c-text-light-2: rgba(60, 60, 60, 0.66);
+ --vt-c-text-dark-1: var(--vt-c-white);
+ --vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
+}
+
+/* semantic color variables for this project */
+:root {
+ --color-background: var(--vt-c-white);
+ --color-background-soft: var(--vt-c-white-soft);
+ --color-background-mute: var(--vt-c-white-mute);
+
+ --color-border: var(--vt-c-divider-light-2);
+ --color-border-hover: var(--vt-c-divider-light-1);
+
+ --color-heading: var(--vt-c-text-light-1);
+ --color-text: var(--vt-c-text-light-1);
+
+ --section-gap: 160px;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --color-background: var(--vt-c-black);
+ --color-background-soft: var(--vt-c-black-soft);
+ --color-background-mute: var(--vt-c-black-mute);
+
+ --color-border: var(--vt-c-divider-dark-2);
+ --color-border-hover: var(--vt-c-divider-dark-1);
+
+ --color-heading: var(--vt-c-text-dark-1);
+ --color-text: var(--vt-c-text-dark-2);
+ }
+}
+
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+ margin: 0;
+ font-weight: normal;
+}
+
+body {
+ min-height: 100vh;
+ color: var(--color-text);
+ background: var(--color-background);
+ transition:
+ color 0.5s,
+ background-color 0.5s;
+ line-height: 1.6;
+ font-family:
+ Inter,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ 'Fira Sans',
+ 'Droid Sans',
+ 'Helvetica Neue',
+ sans-serif;
+ font-size: 15px;
+ text-rendering: optimizeLegibility;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
diff --git a/src/assets/logo.svg b/src/assets/logo.svg
new file mode 100644
index 0000000..7565660
--- /dev/null
+++ b/src/assets/logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
diff --git a/src/assets/main.css b/src/assets/main.css
new file mode 100644
index 0000000..36fb845
--- /dev/null
+++ b/src/assets/main.css
@@ -0,0 +1,35 @@
+@import './base.css';
+
+#app {
+ max-width: 1280px;
+ margin: 0 auto;
+ padding: 2rem;
+ font-weight: normal;
+}
+
+a,
+.green {
+ text-decoration: none;
+ color: hsla(160, 100%, 37%, 1);
+ transition: 0.4s;
+ padding: 3px;
+}
+
+@media (hover: hover) {
+ a:hover {
+ background-color: hsla(160, 100%, 37%, 0.2);
+ }
+}
+
+@media (min-width: 1024px) {
+ body {
+ display: flex;
+ place-items: center;
+ }
+
+ #app {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ padding: 0 2rem;
+ }
+}
diff --git a/src/main.ts b/src/main.ts
new file mode 100644
index 0000000..fda1e6e
--- /dev/null
+++ b/src/main.ts
@@ -0,0 +1,12 @@
+import { createApp } from 'vue'
+import { createPinia } from 'pinia'
+
+import App from './App.vue'
+import router from './router'
+
+const app = createApp(App)
+
+app.use(createPinia())
+app.use(router)
+
+app.mount('#app')
diff --git a/src/router/index.ts b/src/router/index.ts
new file mode 100644
index 0000000..0f02263
--- /dev/null
+++ b/src/router/index.ts
@@ -0,0 +1,15 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import HomeView from '../views/HomeView.vue'
+
+const router = createRouter({
+ history: createWebHistory()
+ routes: [
+ {
+ path: '/',
+ name: 'home',
+ component: HomeView,
+ },
+ ],
+})
+
+export default router
diff --git a/src/stores/news.ts b/src/stores/news.ts
new file mode 100644
index 0000000..31866ba
--- /dev/null
+++ b/src/stores/news.ts
@@ -0,0 +1,5 @@
+import { ref, computed } from 'vue'
+import { defineStore } from 'pinia'
+
+export const useNewsStore = defineStore('news', () => {
+})
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
new file mode 100644
index 0000000..5d3102c
--- /dev/null
+++ b/src/views/HomeView.vue
@@ -0,0 +1,7 @@
+<script setup lang="ts">
+</script>
+
+<template>
+ <main>
+ </main>
+</template>
diff --git a/tsconfig.app.json b/tsconfig.app.json
new file mode 100644
index 0000000..c0f2d86
--- /dev/null
+++ b/tsconfig.app.json
@@ -0,0 +1,18 @@
+{
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
+ "exclude": ["src/**/__tests__/*"],
+ "compilerOptions": {
+ // Extra safety for array and object lookups, but may have false positives.
+ "noUncheckedIndexedAccess": true,
+
+ // Path mapping for cleaner imports.
+ "paths": {
+ "@/*": ["./src/*"]
+ },
+
+ // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
+ // Specified here to keep it out of the root directory.
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo"
+ }
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..66b5e57
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "files": [],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ },
+ {
+ "path": "./tsconfig.app.json"
+ }
+ ]
+}
diff --git a/tsconfig.node.json b/tsconfig.node.json
new file mode 100644
index 0000000..5988839
--- /dev/null
+++ b/tsconfig.node.json
@@ -0,0 +1,28 @@
+// TSConfig for modules that run in Node.js environment via either transpilation or type-stripping.
+{
+ "extends": "@tsconfig/node24/tsconfig.json",
+ "include": [
+ "vite.config.*",
+ "vitest.config.*",
+ "cypress.config.*",
+ "nightwatch.conf.*",
+ "playwright.config.*",
+ "eslint.config.*"
+ ],
+ "compilerOptions": {
+ // Most tools use transpilation instead of Node.js's native type-stripping.
+ // Bundler mode provides a smoother developer experience.
+ "module": "preserve",
+ "moduleResolution": "bundler",
+
+ // Include Node.js types and avoid accidentally including other `@types/*` packages.
+ "types": ["node"],
+
+ // Disable emitting output during `vue-tsc --build`, which is used for type-checking only.
+ "noEmit": true,
+
+ // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
+ // Specified here to keep it out of the root directory.
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo"
+ }
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..fdea1a2
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,23 @@
+import { fileURLToPath, URL } from 'node:url'
+
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+import vueDevTools from 'vite-plugin-vue-devtools'
+
+// https://vite.dev/config/
+export default defineConfig({
+ plugins: [
+ vue(),
+ vueDevTools(),
+ ],
+ resolve: {
+ alias: {
+ '@': fileURLToPath(new URL('./src', import.meta.url))
+ },
+ },
+ server: {
+ proxy: {
+ '/api': 'http://localhost:3000'
+ }
+ }
+})