Clean up exported data

This commit is contained in:
2026-03-10 10:05:09 +01:00
parent b2db685579
commit d9210087b2
5 changed files with 25 additions and 9 deletions

11
.npmignore Normal file
View File

@@ -0,0 +1,11 @@
node_modules
.git
.vscode
dist
**/*
!dist/
!dist/**
!src/styles/
!.gitignore
.github
/.github

View File

@@ -23,23 +23,23 @@ npm install git+https://git.maze.io/maze/cyberduck.git#main
Note: when installing from a git repository, npm will clone the source. For consumers to get built artifacts (the `dist` bundle and compiled types) the repository must either include the `dist` output or provide a `prepare`/build step that runs on install. If you prefer not to publish, using `npm pack` from the repo owner (tarball) ensures the built `dist` is included.
## Including styles
## Including styles (optional)
CyberDuck emits a single bundled stylesheet. Preferred import options:
Styles are optional — CyberDuck does not automatically inject styles when you import components. Import styles only if you want the theme and utilities applied.
- Import the packaged CSS via the package export (recommended):
- Recommended (package export):
```ts
import 'cyberduck/css'
```
- Import the compiled CSS file directly (older setups):
- Direct CSS file (older setups):
```ts
import 'cyberduck/dist/cyberduck.css'
```
- If you want to include and compile the SCSS source in your app (allows customization), import the SCSS entry:
- Compile and include SCSS in your app (for customization):
```scss
@use 'cyberduck/styles/cyberduck.scss' as *;

View File

@@ -57,7 +57,7 @@
},
"scripts": {
"dev": "vite",
"build": "tsc -p tsconfig.build.json && vite build",
"build": "tsc -p tsconfig.build.json && npm run styles:build && vite build",
"prepare": "npm run build",
"lint": "eslint .",
"lint:css": "stylelint \"src/**/*.{scss,css,sass}\"",

View File

@@ -4,5 +4,6 @@ export { default as Footer } from './components/Layout/Footer'
export { default as Layout } from './components/Layout/Layout'
export { default as Split } from './components/Layout/Split'
// Export styles so consumers can import the theme
import './index.scss'
// Styles are optional — consumers can import the CSS or SCSS themselves:
// import 'cyberduck/css'
// import 'cyberduck/styles/cyberduck.scss'

View File

@@ -6,5 +6,9 @@
"emitDeclarationOnly": true,
"outDir": "dist/types"
},
"include": ["src"]
"include": [
"src/components",
"src/index.ts",
"src/styles"
]
}