Skip to content

Commit 97ec775

Browse files
committed
Update build configuration and package dependencies. Changed build script to use tsup for generating both ESM and CJS outputs. Updated package.json to reflect new main and module entries. Added .gitignore entries for .cjs and .d.cts files. Removed tsconfig.build.json as it's no longer needed.
1 parent ac8e6dc commit 97ec775

File tree

6 files changed

+1018
-46
lines changed

6 files changed

+1018
-46
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules/
22
dist/
3+
*.cjs
4+
*.d.cts
35
coverage/
46
.env
57
.env.*

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ Type-safe Node.js client for the [Astrology API v3.0.0](https://api.astrology-ap
1414
npm install @procoders/astrology-api-client
1515
```
1616

17+
### Usage
18+
19+
#### ES Modules
20+
```ts
21+
import { AstrologyClient } from '@procoders/astrology-api-client';
22+
```
23+
24+
#### CommonJS
25+
```js
26+
const { AstrologyClient } = require('@procoders/astrology-api-client');
27+
```
28+
1729
### Environment Variables
1830
| Variable | Required | Description |
1931
| --- | --- | --- |
@@ -113,7 +125,7 @@ Pass `debug: true` and optionally supply a custom `logger` function. Setting `AS
113125
npm run lint # ESLint with @typescript-eslint + Prettier
114126
npm run test # Vitest watch mode
115127
npm run test:coverage # Vitest with V8 coverage (enforced at 100 %)
116-
npm run build # TypeScript build (emits ESM to dist/)
128+
npm run build # tsup build emitting ESM (.js) + CJS (.cjs)
117129
```
118130

119131
### Project Structure

0 commit comments

Comments
 (0)