aboutsummaryrefslogtreecommitdiffstats
path: root/src/packages/vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/packages/vue')
-rw-r--r--src/packages/vue/.gitignore24
-rw-r--r--src/packages/vue/README.md28
-rw-r--r--src/packages/vue/eslint.config.mjs11
-rw-r--r--src/packages/vue/index.html13
-rw-r--r--src/packages/vue/package.json58
-rw-r--r--src/packages/vue/src/components/Locusts.vue6
-rw-r--r--src/packages/vue/src/index.ts3
-rw-r--r--src/packages/vue/src/vite-env.d.ts1
-rw-r--r--src/packages/vue/tsconfig.json14
-rw-r--r--src/packages/vue/vite.config.ts23
10 files changed, 181 insertions, 0 deletions
diff --git a/src/packages/vue/.gitignore b/src/packages/vue/.gitignore
new file mode 100644
index 0000000..a547bf3
--- /dev/null
+++ b/src/packages/vue/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/src/packages/vue/README.md b/src/packages/vue/README.md
new file mode 100644
index 0000000..4d41eb3
--- /dev/null
+++ b/src/packages/vue/README.md
@@ -0,0 +1,28 @@
+# @locusts/vue
+
+[![CI](https://github.com/locusts-r-us/locusts/actions/workflows/node.yml/badge.svg)](https://github.com/locusts-r-us/locusts/actions/workflows/node.yml)
+[![NPM Version](https://img.shields.io/npm/v/%40locusts%2Fvue?logo=vuedotjs)](https://www.npmjs.com/package/@locusts/vue)
+
+## Description
+
+@locusts/vue is a member of a [series of components](https://github.com/locusts-r-us/locusts) that allows you to introduce locusts into your website.
+
+Why would you want to do that? I don't know.
+
+## Installation
+
+```bash
+npm install -D @locusts/vue
+```
+
+## Usage
+
+```vue
+<script setup>
+import { Locusts } from "@locusts/vue";
+</script>
+
+<template>
+ <Locusts />
+</template>
+```
diff --git a/src/packages/vue/eslint.config.mjs b/src/packages/vue/eslint.config.mjs
new file mode 100644
index 0000000..eb0d6d0
--- /dev/null
+++ b/src/packages/vue/eslint.config.mjs
@@ -0,0 +1,11 @@
+import library from "@repo/eslint-config/eslint.library.config.js";
+import vue from "eslint-plugin-vue";
+
+/** @type {import("eslint").Linter.Config[]} */
+export default [
+ ...library,
+ ...vue.configs["flat/recommended"],
+ {
+ ignores: ["dist/"],
+ },
+];
diff --git a/src/packages/vue/index.html b/src/packages/vue/index.html
new file mode 100644
index 0000000..a6ef3a8
--- /dev/null
+++ b/src/packages/vue/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Vite + Vue + TS</title>
+ </head>
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/src/index.ts"></script>
+ </body>
+</html>
diff --git a/src/packages/vue/package.json b/src/packages/vue/package.json
new file mode 100644
index 0000000..f3d0580
--- /dev/null
+++ b/src/packages/vue/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "@locusts/vue",
+ "description": "A Vue 3 component that introduces locusts into your website.",
+ "author": "Matt Strapp <matt+locusts@mattstrapp.net> (https://mattstrapp.net)",
+ "bugs": "https://github.com/locusts-r-us/locusts/issues",
+ "license": "0BSD",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/locusts-r-us/locusts.git",
+ "directory": "packages/vue"
+ },
+ "version": "0.0.0",
+ "type": "module",
+ "files": [
+ "dist"
+ ],
+ "main": "./dist/locusts.umd.cjs",
+ "module": "./dist/locusts.js",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/locusts.js",
+ "require": "./dist/locusts.umd.cjs"
+ }
+ },
+ "types": "./dist/index.d.ts",
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build && vue-tsc --declaration --emitDeclarationOnly && publint",
+ "check": "vue-tsc --noEmit",
+ "format": "prettier --write . && eslint --fix .",
+ "lint": "prettier --check . && eslint .",
+ "preview": "vite preview"
+ },
+ "keywords": [
+ "vue",
+ "vue3",
+ "component",
+ "why",
+ "joke"
+ ],
+ "peerDependencies": {
+ "vue": ">=3.0.0"
+ },
+ "devDependencies": {
+ "@repo/eslint-config": "workspace:*",
+ "@repo/typescript-config": "workspace:*",
+ "@vitejs/plugin-vue": "^5.2.0",
+ "eslint-plugin-vue": "^9.31.0",
+ "publint": "^0.2.0",
+ "typescript": "^5.6.3",
+ "vite": "^5.4.11",
+ "vue-tsc": "^2.1.8"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/src/packages/vue/src/components/Locusts.vue b/src/packages/vue/src/components/Locusts.vue
new file mode 100644
index 0000000..a01014e
--- /dev/null
+++ b/src/packages/vue/src/components/Locusts.vue
@@ -0,0 +1,6 @@
+<!-- eslint-disable vue/multi-word-component-names -->
+<script setup lang="ts"></script>
+
+<template>
+ <div />
+</template>
diff --git a/src/packages/vue/src/index.ts b/src/packages/vue/src/index.ts
new file mode 100644
index 0000000..5158db7
--- /dev/null
+++ b/src/packages/vue/src/index.ts
@@ -0,0 +1,3 @@
+import Locusts from "./components/Locusts.vue";
+
+export { Locusts };
diff --git a/src/packages/vue/src/vite-env.d.ts b/src/packages/vue/src/vite-env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/src/packages/vue/src/vite-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="vite/client" />
diff --git a/src/packages/vue/tsconfig.json b/src/packages/vue/tsconfig.json
new file mode 100644
index 0000000..23ddef4
--- /dev/null
+++ b/src/packages/vue/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "@repo/typescript-config/base.json",
+ "compilerOptions": {
+ "outDir": "dist",
+ "declaration": true,
+ "declarationDir": "dist",
+ "emitDeclarationOnly": true,
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
+ "useDefineForClassFields": true
+ },
+ "exclude": ["node_modules", "dist"],
+ "include": ["src"]
+}
diff --git a/src/packages/vue/vite.config.ts b/src/packages/vue/vite.config.ts
new file mode 100644
index 0000000..c1b4415
--- /dev/null
+++ b/src/packages/vue/vite.config.ts
@@ -0,0 +1,23 @@
+import { resolve } from "node:path";
+import { defineConfig } from "vite";
+import vue from "@vitejs/plugin-vue";
+
+// https://vite.dev/config/
+export default defineConfig({
+ plugins: [vue()],
+ build: {
+ lib: {
+ entry: resolve(__dirname, "src/index.ts"),
+ name: "Locusts",
+ fileName: "locusts",
+ },
+ rollupOptions: {
+ external: ["vue"],
+ output: {
+ globals: {
+ vue: "Vue",
+ },
+ },
+ },
+ },
+});