Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Gumball12 committed Feb 25, 2024
1 parent 9142e6b commit 061a8a5
Show file tree
Hide file tree
Showing 12 changed files with 370 additions and 46 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,51 @@
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/google-spreadsheet-dts)](https://www.npmjs.com/package/google-spreadsheet-dts) ![[npm downloads]((https://img.shields.io/bundlephobia/minzip/google-spreadsheet-dts))](https://img.shields.io/npm/dm/google-spreadsheet-dts) ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/Gumball12/google-spreadsheet-dts?filename=package.json)

[![ci](https://github.com/Gumball12/google-spreadsheet-dts/actions/workflows/ci.yaml/badge.svg)](https://github.com/Gumball12/google-spreadsheet-dts/actions/workflows/ci.yaml) [![publish](https://github.com/Gumball12/google-spreadsheet-dts/actions/workflows/publish-npm.yaml/badge.svg)](https://github.com/Gumball12/google-spreadsheet-dts/actions/workflows/publish-npm.yaml) [![codecov](https://codecov.io/gh/Gumball12/google-spreadsheet-dts/graph/badge.svg?token=8uuKMCW2bk)](https://codecov.io/gh/Gumball12/google-spreadsheet-dts) [![changelog](https://img.shields.io/badge/CHANGELOG-gray)](./CHANGELOG.md)

![logo](./docs/logo-extended.png)

## 💫 Features

| Parser | State |
| --------------------------- | ----- |
| public-google-sheets-parser ||
| google-spreadsheet-parser | 🚧 |

## 📦 Install

```bash
npm i --save-dev google-spreadsheet-dts
yarn add -D google-spreadsheet-dts
pnpm add -D google-spreadsheet-dts
```

## 🚀 Usage

```ts
// scripts/generate-google-sheets-dts.ts
import { generateDts } from 'google-spreadsheet-dts';
import { publicGoogleSheetsParser } from 'google-spreadsheet-dts/parser';

generateDts({
fileName: 'google-sheets.d.ts',
typeName: 'GoogleSheets',
parser: publicGoogleSheetsParser({
spreadSheetId: '...',
path: ['UserAction', 'PropertyName'],
typeName: 'Type',
publicGoogleSheetsParser: {
sheetName: '...',
},
}),
});
```

```bash
ts-node scripts/generate-google-sheets-dts.ts
```

## 📚 API

## License

[MIT](./LICENSE) @Gumball12
Binary file added docs/logo-extended.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"google-auth-library": "^9.6.3",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
Expand All @@ -66,6 +67,7 @@
"vitest": "^1.3.1"
},
"dependencies": {
"google-spreadsheet": "^4.1.1",
"public-google-sheets-parser": "^1.3.2"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit 061a8a5

Please sign in to comment.