Skip to content

Commit 780aac7

Browse files
committed
docs: improve External Resource AI Skill
1 parent 45125f0 commit 780aac7

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

.github/skills/create-slickgrid-package.SKILL.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
## Create a new SlickGrid‑Universal package
22

3-
This skill documents the recommended steps and minimal references for adding a new package to the slickgrid‑universal monorepo. Use `SlickEmptyWarningComponent` (packages/empty-warning-component) as a simple reference implementation.
3+
New packages in the slickgrid‑universal monorepo are typically created when adding a new optional **External Resource** (i.e. a plugin or component that integrates with the grid but is not part of the core). This skill documents the recommended steps and minimal references for doing so. Use `SlickEmptyWarningComponent` ([packages/empty-warning-component](packages/empty-warning-component)) as a simple reference implementation.
44

55
Key points
66
- New packages that integrate with the grid should implement the `ExternalResource` interface from `@slickgrid-universal/common`.
77
- Every package should provide an `init(grid: SlickGrid)` method. When you need services from `@slickgrid-universal/common`, use the second argument `init(grid: SlickGrid, containerService: ContainerService)` to obtain them.
88
- Available Services (examples) are listed in the vanilla bundle; see [packages/vanilla-bundle/src/slick-vanilla-grid-bundle.ts](packages/vanilla-bundle/src/slick-vanilla-grid-bundle.ts#L399-L414).
9-
- To publish on npm with OIDC (initial publish), use `azu/setup-npm-trusted-publish` for trusted publishing.
109

1110
Quick checklist
1211
- Create package folder under `packages/your-package-name/`.
@@ -35,9 +34,7 @@ Minimal package structure
3534
Example: ExternalResource implementation (TypeScript)
3635

3736
```ts
38-
import type { SlickGrid } from '@slickgrid-universal/common';
39-
import type { ContainerService } from '@slickgrid-universal/common';
40-
import type { ExternalResource } from '@slickgrid-universal/common';
37+
import type { ContainerService, ExternalResource, SlickGrid } from '@slickgrid-universal/common';
4138

4239
export class MyNewPackage implements ExternalResource {
4340
readonly pluginName = 'MyNewPackage';
@@ -71,5 +68,3 @@ References
7168
- Services list: [packages/vanilla-bundle/src/slick-vanilla-grid-bundle.ts](packages/vanilla-bundle/src/slick-vanilla-grid-bundle.ts#L399-L414).
7269
- TypeScript project references: [tsconfig.packages.json](tsconfig.packages.json).
7370
- OIDC publish action: https://github.com/azu/setup-npm-trusted-publish
74-
75-
If you want, I can scaffold a minimal package skeleton (files + package.json + build/test scripts) for `packages/your-new-package` and a short example class modeled after `SlickEmptyWarningComponent`.

0 commit comments

Comments
 (0)