Skip to content

Commit

Permalink
Generate declaration files
Browse files Browse the repository at this point in the history
  • Loading branch information
williamgrosset committed May 17, 2024
1 parent 33a0877 commit 2c43bf8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ Implement hooks to control the plugin's lifecycle.
| publish() | Called to handle the publishing process. |
| postPublish() | Called after the package has been published. |

Any of the methods can be `async`.
Any of the hooks can be `async`.

## Configuration

Plugins support configuration with a `packpub.json` file or `package.json`. When an instance is created, the configuration is passed to the class constructor.
Plugins support configuration with a `packpub.json` file or `package.json`. When an instance is created, the configuration is passed to the plugin.

```json
{
Expand All @@ -95,12 +95,12 @@ Plugins support configuration with a `packpub.json` file or `package.json`. When

## Flags

Plugins support flags that can modify the execution of various utility methods and lifecycle hooks:
Plugins support flags that modify the execution of various utility methods and lifecycle hooks:

| Flag | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **dry** | When set to `true`, the plugin runs in dry mode and no write operations will be performed. |
| **headless** | When set to `true`, the plugin runs in headless mode and user prompts will return defaults and write-based shell execution will be ignored. |
| Flag | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| **dry** | When set to `true`, run in dry mode and no write operations will be performed. |
| **headless** | When set to `true`, run in headless mode and user prompts will return defaults and write-based shell execution will be ignored. |

> [!IMPORTANT]
> Flags are set from the packpub CLI
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"node": ">=18"
},
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"moduleResolution": "node16",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"declaration": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
Expand Down

0 comments on commit 2c43bf8

Please sign in to comment.