Skip to content

Commit 8d6841c

Browse files
committed
feat: create @excel-builder-vanilla/types package for types only
1 parent 27a1b05 commit 8d6841c

File tree

6 files changed

+95
-0
lines changed

6 files changed

+95
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tsconfig.json
2+
tsconfig.tsbuildinfo
3+
node_modules
4+
CHANGELOG.md
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2009-present Stephen Liberty
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @excel-builder-vanilla/types
2+
3+
This package contains only the shared interfaces and types of excel-builder-vanilla's package.
4+
5+
A use-case for `@excel-builder-vanilla/types` is when you want to import excel-builder-vanilla's to create interfaces as shown below.
6+
7+
```ts
8+
import type { ExcelStyleInstruction, Worksheet, Workbook } from '@excel-builder-vanilla/types';
9+
10+
export interface ExcelExportOption {
11+
columnHeaderStyle?: ExcelStyleInstruction;
12+
customExcelHeader?: (workbook: Workbook, sheet: Worksheet) => void;
13+
14+
// ....
15+
}
16+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export type {};
2+
3+
declare global {
4+
interface Window {
5+
ExcelBuilder: any;
6+
}
7+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "@excel-builder-vanilla/types",
3+
"version": "3.0.0",
4+
"description": "excel-builder-vanilla types",
5+
"author": "Stephen Liberty",
6+
"contributors": [
7+
{
8+
"name": "Ghislain B."
9+
}
10+
],
11+
"homepage": "https://github.com/ghiscoding/excel-builder-vanilla",
12+
"bugs": {
13+
"url": "https://github.com/ghiscoding/excel-builder-vanilla/issues"
14+
},
15+
"license": "MIT",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/ghiscoding/excel-builder-vanilla.git",
19+
"directory": "packages/excel-builder-vanilla-types"
20+
},
21+
"publishConfig": {
22+
"access": "public"
23+
},
24+
"main": "./dist/excel-builder.js",
25+
"types": "./dist/index.d.ts",
26+
"exports": {
27+
".": {
28+
"types": "./dist/index.d.ts",
29+
"default": "./dist/excel-builder.js"
30+
},
31+
"./package.json": "./package.json"
32+
},
33+
"sideEffects": false,
34+
"funding": {
35+
"type": "ko_fi",
36+
"url": "https://ko-fi.com/ghiscoding"
37+
},
38+
"dependencies": {
39+
"fflate": "^0.8.2"
40+
}
41+
}

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)