diff --git a/package.json b/package.json index 1ee8ccc..511e3fb 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,13 @@ { "name": "@ayo-run/status-indicator", - "version": "0.0.1", + "version": "0.0.3-alpha", "type": "module", "description": "Project scaffolding for a new web component", "license": "ISC", "author": "Ayo Ayco", "module": "./dist/status-indicator.js", "exports": { - ".": { - "import": "./dist/status-indicator.js" - } + ".": "./dist/status-indicator.js" }, "files": [ "dist", @@ -20,10 +18,12 @@ "scripts": { "test": "echo \"Warning: no test specified\"", "build": "vite build", + "build:lib": "vite build --config vite-lib.config.ts", "dev": "vite", "prepare": "husky" }, "devDependencies": { + "@types/node": "^25.6.1", "eslint": "^10.3.0", "husky": "^9.1.7", "vite": "^8.0.11" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab321da..a040fa8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,6 +12,9 @@ importers: specifier: ^4.1.1 version: 4.1.1 devDependencies: + '@types/node': + specifier: ^25.6.1 + version: 25.6.1 eslint: specifier: ^10.3.0 version: 10.3.0 @@ -20,7 +23,7 @@ importers: version: 9.1.7 vite: specifier: ^8.0.11 - version: 8.0.11 + version: 8.0.11(@types/node@25.6.1) packages: @@ -202,6 +205,9 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@25.6.1': + resolution: {integrity: sha512-coJCN8O1q4AGyyqCAUSP06P+SrMTu18BkEj3NVAK07q6QUneD2wzj3CLv9+yP+BMeZQlMvneXqqvDe3w+xcq7g==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -531,6 +537,9 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + undici-types@7.19.2: + resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -728,6 +737,10 @@ snapshots: '@types/json-schema@7.0.15': {} + '@types/node@25.6.1': + dependencies: + undici-types: 7.19.2 + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 @@ -1028,11 +1041,13 @@ snapshots: dependencies: prelude-ls: 1.2.1 + undici-types@7.19.2: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 - vite@8.0.11: + vite@8.0.11(@types/node@25.6.1): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -1040,6 +1055,7 @@ snapshots: rolldown: 1.0.0-rc.18 tinyglobby: 0.2.16 optionalDependencies: + '@types/node': 25.6.1 fsevents: 2.3.3 web-component-base@4.1.1: {} diff --git a/vite-lib.config.ts b/vite-lib.config.ts new file mode 100644 index 0000000..1d69de1 --- /dev/null +++ b/vite-lib.config.ts @@ -0,0 +1,12 @@ +import { resolve } from 'node:path' +import { defineConfig } from 'vite' + +export default defineConfig({ + build: { + lib: { + entry: resolve(import.meta.dirname, 'src/status-indicator.js'), + name: 'StatusIndicator', + fileName: 'status-indicator' + } + } +}) \ No newline at end of file