Clean up exported data
This commit is contained in:
11
.npmignore
Normal file
11
.npmignore
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
.vscode
|
||||||
|
dist
|
||||||
|
**/*
|
||||||
|
!dist/
|
||||||
|
!dist/**
|
||||||
|
!src/styles/
|
||||||
|
!.gitignore
|
||||||
|
.github
|
||||||
|
/.github
|
||||||
10
README.md
10
README.md
@@ -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.
|
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
|
```ts
|
||||||
import 'cyberduck/css'
|
import 'cyberduck/css'
|
||||||
```
|
```
|
||||||
|
|
||||||
- Import the compiled CSS file directly (older setups):
|
- Direct CSS file (older setups):
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import 'cyberduck/dist/cyberduck.css'
|
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
|
```scss
|
||||||
@use 'cyberduck/styles/cyberduck.scss' as *;
|
@use 'cyberduck/styles/cyberduck.scss' as *;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"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",
|
"prepare": "npm run build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:css": "stylelint \"src/**/*.{scss,css,sass}\"",
|
"lint:css": "stylelint \"src/**/*.{scss,css,sass}\"",
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ export { default as Footer } from './components/Layout/Footer'
|
|||||||
export { default as Layout } from './components/Layout/Layout'
|
export { default as Layout } from './components/Layout/Layout'
|
||||||
export { default as Split } from './components/Layout/Split'
|
export { default as Split } from './components/Layout/Split'
|
||||||
|
|
||||||
// Export styles so consumers can import the theme
|
// Styles are optional — consumers can import the CSS or SCSS themselves:
|
||||||
import './index.scss'
|
// import 'cyberduck/css'
|
||||||
|
// import 'cyberduck/styles/cyberduck.scss'
|
||||||
|
|||||||
@@ -6,5 +6,9 @@
|
|||||||
"emitDeclarationOnly": true,
|
"emitDeclarationOnly": true,
|
||||||
"outDir": "dist/types"
|
"outDir": "dist/types"
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": [
|
||||||
|
"src/components",
|
||||||
|
"src/index.ts",
|
||||||
|
"src/styles"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user