diff --git a/lib/package.json b/lib/package.json new file mode 100644 index 0000000..4d7affc --- /dev/null +++ b/lib/package.json @@ -0,0 +1,43 @@ +{ + "name": "@ayo-run/status-indicator", + "version": "2.0.3", + "type": "module", + "description": "Circles with color that can pulse to indicate status", + "license": "MIT", + "author": "Ayo Ayco", + "repository": { + "type": "git", + "url": "git+https://github.com/ayo-run/status-indicator.git", + "directory": "lib" + }, + "homepage": "https://status-indicator.webcomponent.io", + "module": "./dist/status-indicator.js", + "exports": { + ".": { + "default": "./dist/status-indicator.js", + "import": "./dist/status-indicator.js", + "require": "./dist/status-indicator.umd.cjs" + } + }, + "files": [ + "dist", + "README.md", + "LICENSE", + "screenshot.png" + ], + "scripts": { + "test": "echo \"Warning: no test specified\"", + "build": "vite build", + "prepare": "husky" + }, + "devDependencies": { + "@types/node": "^25.6.2", + "eslint": "^10.3.0", + "husky": "^9.1.7", + "unplugin-dts": "^1.0.0", + "vite": "^8.0.11" + }, + "peerDependencies": { + "web-component-base": "^4.1.2" + } +} diff --git a/src/status-indicator.ts b/lib/src/status-indicator.ts similarity index 95% rename from src/status-indicator.ts rename to lib/src/status-indicator.ts index da948b3..9f9a586 100644 --- a/src/status-indicator.ts +++ b/lib/src/status-indicator.ts @@ -43,8 +43,8 @@ class StatusIndicator extends WebComponent { marginRight: '0.05rem', ...(this.props.pulse ? this.#pulseAnimationCSSRules : []) }}> - - + Weeeee + Wooooo ${ /** if pulse is set, add animation keyframes */ diff --git a/vite-lib.config.ts b/lib/vite.config.ts similarity index 85% rename from vite-lib.config.ts rename to lib/vite.config.ts index 4ef302c..ef925a3 100644 --- a/vite-lib.config.ts +++ b/lib/vite.config.ts @@ -1,6 +1,5 @@ import { resolve } from 'node:path' import { defineConfig } from 'vite' -import dts from 'unplugin-dts/vite' export default defineConfig({ build: { @@ -8,7 +7,6 @@ export default defineConfig({ entry: resolve(import.meta.dirname, 'src/status-indicator.js'), name: 'StatusIndicator', fileName: 'status-indicator', - formats: ['es'] }, rolldownOptions: { external: ['web-component-base'], @@ -19,6 +17,5 @@ export default defineConfig({ } } } - }, - plugins: [dts()] + } }) \ No newline at end of file diff --git a/package.json b/package.json index 7bd8a69..bd4afb6 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,13 @@ { - "name": "@ayo-run/status-indicator", - "version": "2.0.3", + "name": "status-indicator-monorepo", + "version": "1.0.0", + "private": true, "type": "module", - "description": "Circles with color that can pulse to indicate status", - "license": "MIT", - "author": "Ayo Ayco", - "repository": { - "type": "git", - "url": "git+https://github.com/ayo-run/status-indicator.git" - }, - "homepage": "https://status-indicator.webcomponent.io", - "module": "./dist/status-indicator.js", - "exports": { - ".": { - "default": "./dist/status-indicator.js", - "import": "./dist/status-indicator.js", - "require": "./dist/status-indicator.umd.cjs" - } - }, - "files": [ - "dist", - "README.md", - "LICENSE", - "screenshot.png" - ], "scripts": { "test": "echo \"Warning: no test specified\"", - "build": "vite build", - "build:lib": "vite build --config vite-lib.config.ts", - "dev": "vite", + "dev": "pnpm -F site run dev", + "build:site": "pnpm -F site run build", + "build:lib": "pnpm -F @ayo-run/status-indicator run build", "prepare": "husky" }, "devDependencies": { @@ -37,8 +16,5 @@ "husky": "^9.1.7", "unplugin-dts": "^1.0.0", "vite": "^8.0.11" - }, - "peerDependencies": { - "web-component-base": "^4.1.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ced7aa8..0cf7a5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,24 @@ settings: importers: .: + devDependencies: + '@types/node': + specifier: ^25.6.2 + version: 25.6.2 + eslint: + specifier: ^10.3.0 + version: 10.3.0 + husky: + specifier: ^9.1.7 + version: 9.1.7 + unplugin-dts: + specifier: ^1.0.0 + version: 1.0.0(typescript@6.0.3)(vite@8.0.11(@types/node@25.6.2)) + vite: + specifier: ^8.0.11 + version: 8.0.11(@types/node@25.6.2) + + lib: dependencies: web-component-base: specifier: ^4.1.2 @@ -28,8 +46,17 @@ importers: specifier: ^8.0.11 version: 8.0.11(@types/node@25.6.2) + site: + dependencies: + '@ayo-run/status-indicator': + specifier: '*' + version: 1.1.1 + packages: + '@ayo-run/status-indicator@1.1.1': + resolution: {integrity: sha512-ZxNEiTkrYAEZWbCNLKu7tHoPVWfGTPVRZXpe7Vxsu5s50ZOmu+bmdxQn5xGXljvSUWb8qNB8trCz7trm46/9xQ==} + '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -732,6 +759,10 @@ packages: snapshots: + '@ayo-run/status-indicator@1.1.1': + dependencies: + web-component-base: 4.1.2 + '@emnapi/core@1.10.0': dependencies: '@emnapi/wasi-threads': 1.2.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fb045c4..91e6656 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,5 @@ +packages: + - "site" + - "lib" allowBuilds: web-component-base: false diff --git a/index.html b/site/index.html similarity index 98% rename from index.html rename to site/index.html index 3a44a41..08db365 100644 --- a/index.html +++ b/site/index.html @@ -18,8 +18,12 @@ + + - + + +