Fără Descriere

Danilo Fragoso 33742b2d9b point exports to source instead of nonexistent dist 3 luni în urmă
src 8f3dc350be add side prop to dropdown for upward opening 3 luni în urmă
static c5f123495f 🫒 4 luni în urmă
.gitignore c5f123495f 🫒 4 luni în urmă
.npmrc c5f123495f 🫒 4 luni în urmă
README.md 56465bbb6d add theme persistence and fix exports 3 luni în urmă
design.md c5f123495f 🫒 4 luni în urmă
package-lock.json 56465bbb6d add theme persistence and fix exports 3 luni în urmă
package.json 33742b2d9b point exports to source instead of nonexistent dist 3 luni în urmă
svelte.config.js c5f123495f 🫒 4 luni în urmă
tsconfig.json c5f123495f 🫒 4 luni în urmă
vite.config.ts c5f123495f 🫒 4 luni în urmă

README.md

🫒 olive

A calm, precise component library built with Svelte 5 and Tailwind v4. Designed for data-dense interfaces that need to feel trustworthy.

Development

npm install
npm run dev

Publishing to npm

Olive uses @sveltejs/package to build the library.

1. Install packaging tools

npm install -D @sveltejs/package publint

2. Configure package.json

{
  "name": "@database.pizza/olive",
  "version": "0.1.0",
  "scripts": {
    "dev": "vite dev",
    "build": "vite build",
    "package": "svelte-kit sync && svelte-package && publint",
    "prepublishOnly": "npm run package"
  },
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "svelte": "./dist/index.js"
    },
    "./styles": "./dist/app.css"
  },
  "svelte": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "files": ["dist"]
}

3. Build and publish

# Build into dist/
npm run package

# Verify the package exports are correct
npx publint

# Publish
npm publish

How it works

  • svelte-package reads src/lib/ and compiles everything into dist/
  • src/lib/index.ts is the public API — only what's exported there is available to consumers
  • Svelte files ship as source so consuming apps can tree-shake and SSR natively
  • TypeScript types are generated automatically alongside each file
  • publint validates the package.json exports field before you publish