Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript support #10

Merged
merged 15 commits into from
Sep 22, 2023
Merged

Typescript support #10

merged 15 commits into from
Sep 22, 2023

Conversation

danrowden
Copy link
Contributor

No description provided.

NuroDev and others added 11 commits September 4, 2023 10:39
* Added initial `pnpm-lock.yaml`

* Added `typescript` dev dependency

* Updated `.gitignore`

* Added `tsup` dev dependency

* Added `@types/node` dev dependency

* Added initial basic TypeScript config

* Added `build` & `dev` scripts

* Added initial basic `tsup` config

* Moved `index.js` to `src/` directory

* Minor config tweaks

* Added `Development` section to README.md

* Formatted README.md

* Added `prepublishOnly` script

* Added `files` property to `package.json`

* Updated `package.json`’s `main`, `module` & `types` properties

* Added `.ts` files to tsconfig `include`

* Added initial TypeScript types

* Renamed `queryApi` to `_query`

* Improved `buildParams` types

* Renamed `buildParams` to `private _buildParams`

* Added initial product(s) types

* Added tree-shake export for `LemonSqueezy` class

* Updated `tsup.config.ts` entry

* Updated product `include` type

* Replaced `==` with `===`

* Added support for array includes

* Added variant types

* Added checkout types

* Minor doc comment tweaks

* Added customer types

* Added orders types

* Added order item types

---------

Co-authored-by: Dan <hello@danrowden.com>
@danrowden danrowden mentioned this pull request Sep 14, 2023
src/types/methods.ts Outdated Show resolved Hide resolved
src/types/api.ts Outdated Show resolved Hide resolved
src/types/api.ts Outdated Show resolved Hide resolved
src/types/api.ts Show resolved Hide resolved
src/types/api.ts Outdated Show resolved Hide resolved
src/types/api.ts Outdated Show resolved Hide resolved
@danrowden danrowden marked this pull request as ready for review September 22, 2023 11:28
@danrowden danrowden merged commit b9339e8 into main Sep 22, 2023
@@ -6,7 +6,7 @@ export default defineConfig(({ watch = false }) => ({
clean: true,
dts: true,
entry: {
index: "./src/index.js",
index: "./src/index.ts",
},
format: ["cjs", "esm"],
minify: isProduction,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would want to add:

env: {
NODE_ENV: isProduction ? 'production' : 'developement'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants